Questions tagged [php-5.4]

PHP 5.4 is the successor to PHP 5.3. It was released on March 1, 2012. Use this tag for version-specific issues relating to specifically to PHP 5.4.

PHP 5.4 Changes:

  • Support for traits has been added.
  • Short array syntax has been added, e.g. $a = [1, 2, 3, 4]; or $a = ['one' => 1, 'two' => 2, 'three' => 3, 'four' => 4];.
  • Function array dereferencing has been added, e.g. foo()[0].
  • Closures now support $this.
  • <?= is now always available, regardless of the short_open_tag php.ini option.
  • Class member access on instantiation has been added, e.g. (new Foo)->bar().
  • Class::{expr}() syntax is now supported.
  • Binary number format has been added, e.g. 0b001001101.
  • Improved parse error messages and improved incompatible arguments warnings.
  • The session extension can now track the upload progress of files.
  • Built-in development web server in CLI mode.

See Migrating from PHP 5.3.x to PHP 5.4.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:
402 questions
0
votes
0 answers

Which one is efficient define() or Class CONST to keep site/application wide configuration constant in PHP

I like to know which one of the below is efficient to declare site/application wide configuration in PHP. define() class CONST variable.
muni
  • 1,362
  • 2
  • 19
  • 21
0
votes
4 answers

Export an array in .csv using

I have a problem with my .csv. So I tried to generate a .csv from an array using php. In the view I have :
TanGio
  • 766
  • 2
  • 12
  • 34
0
votes
1 answer

PHP: /public_html/index.php NOT working, and Bluehost support has no idea why

My problem is this: The website cannot access the index.php script file. It will not access it by default. It will not access it if I type it explicitly. I can, however, access the login.php script file which is contained in a different…
Kyle Birch
  • 75
  • 1
  • 10
0
votes
0 answers

How to generate cryptographically random numbers?

I want generate 5 digit number. the number will be used to verify phone numbers. the random php functions doesn't use cryptographically strong algorithm, so I can't use them. and openssl_random_pseudo_bytes generate also letters, I need just number…
david
  • 3,310
  • 7
  • 36
  • 59
0
votes
1 answer

symfony2 application on godaddy: no input file specified

I deployed a symfony2 application on godaddy and I got this error: no input file specified. After some research I managed to solve with some changes on .htaccess file: DirectoryIndex app.php RewriteEngine On …
user3174311
  • 1,714
  • 5
  • 28
  • 66
0
votes
1 answer

"chaining" a class to a main class

I couldn't think of the way to describer what I want to do, but I've seen several libraries and frameworks do it and I'm trying to figure it out for something I'm working on. I'm working on an API client that has multiple classes. I have a main…
Eman
  • 1,093
  • 2
  • 26
  • 49
0
votes
0 answers

Dreamweaver CS6 syntax errors in php 5.4

I installed Laravel L5, and when I open the config/app.php file with DW CS6, it says that the file has syntax errors. I guess the PHP syntax is outdated, but I can't find an update for this.
Skatch
  • 2,112
  • 2
  • 14
  • 32
0
votes
1 answer

Unable to Install Zend-Server 6.1 on CentOS 6.5 wtih PHP 5.4 and nginx

I'm getting "No package zend-server-nginx-php-5.4 available." after running yum install zend-server-nginx-php-5.4, setting the repo accordingly (see below) and I have no other idea rather then updating php to solve this problem (something which may…
user3842869
  • 461
  • 4
  • 2
0
votes
1 answer

php get the php name from the url

I have these types of urls something1/anotherThing1/View/fileName.php something2/anotherThing2/View/fileName2.php?variable1=value1&variable2=value2 ... I want to get the fileName without the .php I tried this $_SERVER['REQUEST_URI'] but it seems…
Marco Dinatsoli
  • 10,322
  • 37
  • 139
  • 253
0
votes
1 answer

PHP post variable isn't returning the whole string value of the hidden input field after submission?

I have this input field that is hidden named loginfo containing this value, after submission, I only get half of the value, and I set the maxlength to 20000
Cushite R
  • 11
  • 5
0
votes
0 answers

How to resolve dll load error

This is the error that is noted in the error log: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\IIS Express\PHP\v5.4\ext\php_sqlsrv_54_ts.dll' - The specified module could not be found. This is the ini file: extension_dir =…
Greg Gum
  • 33,478
  • 39
  • 162
  • 233
0
votes
1 answer

Fetch and show json after submiting a form

I have a problem with my json. I want that when I submit the form to fetch the json and put into the table but now when I submit form I are redirect to a blank page. My form: {{ Form::open(array('url'=>'/register/showMarks','method' =>…
Harea Costea
  • 275
  • 5
  • 19
0
votes
2 answers

segmentation fault after installation piwik 2.9.1

I just downloaded on this website the latest version of Piwik, I install, everything works the first time. But I arrived on the main page right after installation, some wigets not displayed, others do. [Thu Nov 27 20:07:21 2014] [notice] child pid…
Matrix
  • 3,458
  • 6
  • 40
  • 76
0
votes
0 answers

Using MySQL with Old Password and Doctrine running with Php 5.4

I have been trying to use Doctrine with Silex framework. I am using PHP 5.4. When I try to use database, I am getting the error: An exception occured in driver: SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure…
Kiran Madipally
  • 817
  • 9
  • 15
0
votes
1 answer

Create from an array who have multiple arrays - only one key => value

I have a big problem and I can't resolve it, So I have my array : Array ( [0] => Array ( [id] => 34 [groupe_id] => 4 [object_id] => 4 ) [1] => Array ( [id] => 35 [groupe_id] => 4 …
Harea Costea
  • 275
  • 5
  • 19