Questions tagged [php-5.6]

PHP 5.6 was the successor to PHP 5.5. It was released on August 24, 2014 and reached end-of-life on December 31, 2018. Use this tag for version-specific issues relating to specifically to PHP 5.6.

PHP 5.6.0 came with new features such as (incomplete list):

  • Constant scalar expressions
  • Variadic functions
  • Argument unpacking
  • Support for large(>2GiB) file uploads
  • SSL/TLS improvements
  • New command line debugger called phpdbg

See Migrating from PHP 5.5.x to PHP 5.6.x for more information.

Information

  • If you want to talk about PHP or if you have a question, you can come to Chat Room 11: PHP.
  • For global question on PHP, please use the generic tag:
886 questions
2
votes
0 answers

FIPS compliant random number generator for PHP 5.6 (Windows)

I am looking for an implementation of FIPS validated or compliant Random Number Generator for PHP 5.6. From what I have seen, random_bytes and random_int are there but they are only available for PHP 7.0 or above. random_bytes uses windows…
Umair Durrani
  • 79
  • 1
  • 3
2
votes
1 answer

isset() working in php5.6 but not in php7.0

I have a code base that I am trying to migrate to 7.0. In the code, I have something like: isset($user['details']['phone_no']) where $user is an object of User. This works fine in php5.6. where as in php7 it returns false. when doing…
Sahith Vibudhi
  • 4,935
  • 2
  • 32
  • 34
2
votes
1 answer

How to install bcmath on a debian:jessie php5.6?

I am running a linux instance on a docker container. It is a debian:jessie with a php 5.6. I want to install bcmath module, but I have no success. Does someone know how o do that? root@1419c032c35f:/etc/php5/fpm# apt install php5.6-bcmath Reading…
IgorAlves
  • 5,086
  • 10
  • 52
  • 83
2
votes
1 answer

Ensuring laravel stays compatible with php 5.6.x

Now that Laravel 5.5 supports only PHP > 7.0, what can I do to ensure that I can keep it compatible with 5.6.x? I am in a 5.6 environment, upgrading PHP is not an option, and I want to make sure that composer update will not break anything if its…
blamb
  • 4,220
  • 4
  • 32
  • 50
2
votes
3 answers

Creating project in Phalcon 3.2 is php version specific i.e. php 5.6 or php 7.0

In short : So if I install php5-phalcon (3.2) on local machine with php 5.6, can I easily move code to machine with php7.0 or is code version specific? Detail scenario : Local machine has following configuration : Ubuntu 14.04 PHP 5.6 Phalcon 3.2.2…
Bhupender Keswani
  • 1,218
  • 1
  • 9
  • 16
2
votes
0 answers

PHP clone (deep copy)

I want to create a deep copy of my object instead of a shallow one. If I simply call clone I receive an out of memory exception caused by circular references. How can I avoid circular references during my magic clone method? public function…
Spears
  • 2,102
  • 1
  • 17
  • 27
2
votes
1 answer

can I find the cosine inverse to find the angle of a triangle

I am trying to find the angle of a triangle I have complete most of the work using this formula now Problem is that how to find cos inverse in PHP I have the code below to find the cosine inverse echo acos(42/90); it returns a float value, not…
john
  • 25
  • 1
  • 5
2
votes
1 answer

php foreach loop failing to iterate when temporary variables are used

I am trying to iterate through a simple php array, and have run into bizarre behavior that is causing iteration to terminate early. My php version is 5.6.3. The following code prints the numbers 1 through 5, as expected... $values = array(1, 2, 3,…
Austin Yarger
  • 89
  • 2
  • 8
2
votes
2 answers

Telegram : How to Broadcast Message

We are planning to integrate Telegram with our project. The requirement is that when some event occurs, send a notification to a set of users. I have already created a test bot with telegram. My question is, is it possible to do it with bot ie…
nikhil
  • 485
  • 1
  • 6
  • 12
2
votes
2 answers

Force Eloquent to retrieve data using inner joins

is there any way to make a ->get() using Laravel Eloquent ORM and force it to make the query using inner joins instead of using whereIn?. I have a relationship of data like this since a have a lot of data in the tables, Eloquent is taking forever to…
Disa
  • 45
  • 6
2
votes
2 answers

How do i perform an operation on resulted mysql query result without looping/foreach

$users = User:all(); //User:all() is based on the laravel eloquent model , it's just similar to 'select * from user' query $total_spend_amount = 0; foreach($users as $user) { $total_spend_amount += $user->spend_amount; } …
Lejiend
  • 1,219
  • 2
  • 16
  • 24
2
votes
1 answer

check if variable null in declaring function in php5

I have this code when I declaring function I have check if variable null or not null with this code I have problem : private function addDepartementField(FormInterface $form, ?Region $region) { .... } problem is : Parse Error: syntax error,…
paulo_dev
  • 43
  • 2
2
votes
2 answers

How to get property class namespace in php 5.6 via reflection

I want to get the namespace of a class property through ReflectionClass. namespace Foo\Bar; use Foo\Quux\B; class A{ /** * @var B $b */ protected $b = null; ... } In another class I'm creating a ReflectionClass object and trying…
2
votes
1 answer

In PHP 5.6, does mbstring.encoding_translation serve any purpose anymore?

In PHP 5.6 the following configuration variables have been deprecated: mbstring.internal_encoding mbstring.http_input mbstring.http_output Instead we are told that PHP 5.6 and later users should leave these empty and set default_charset instead.…
Daniel
  • 2,869
  • 4
  • 26
  • 28
2
votes
3 answers

Deploying Laravel to Bluehost

I was wondering if anyone has had any experience deploying larval to blue host? I was flowing an youtube tutorial that showed how to deploy a larval application to a shared hosting service. It was using Godaddy.com, however, i was using Bluehost,…
Kaley36
  • 233
  • 9
  • 19