Questions tagged [php-5.5]

PHP 5.5 is the successor to PHP 5.4. It was released on June 20, 2013. Use this tag for version-specific issues relating to specifically to PHP 5.5.

The key features of PHP 5.5.0 include:

  • Added generators and coroutines.
  • Added the finally keyword.
  • Added a simplified password hashing API.
  • Added support for constant array/string dereferencing.
  • Added scalar class name resolution via ::class.
  • Added support for using empty() on the result of function calls and other expressions.
  • Added support for non-scalar Iterator keys in foreach.
  • Added support for list() constructs in foreach statements.
  • Added the Zend OPcache extension for opcode caching.
  • The GD library has been upgraded to version 2.1 adding new functions and improving existing functionality.
  • A lot more improvements and fixes.

See Migrating from PHP 5.4.x to PHP 5.5.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:
527 questions
6
votes
1 answer

Symfony 2.8 Parse error: syntax error, unexpected ':', expecting ';' or '{' in c:\xampp\htdocs\myproject\path\to\AnnotationRegistry.php on line 50

I have downloaded and installed Symfony 2.8 from my own PC. I copied my project and paste it in our companies' pc. I have not created and connected to the database yet. I tried to do php app/console server:run on c:\xampp\htdocs\ninjaz\ but after…
WashichawbachaW
  • 235
  • 5
  • 18
6
votes
2 answers

"Class 'XMLWriter' not found" Error in php | php55w-xml-5.5.24-1.w6.x86_64.rpm is missing

I am getting this error in PHP in server Fatal Error (E_ERROR): Class 'XMLWriter' not found . we are using Cent OS 6 After exploring some sites, we found that we need to install php55w-xml-5.5.24-1.w6.x86_64.rpm. But the link is not working, I am…
Hitesh
  • 4,098
  • 11
  • 44
  • 82
6
votes
1 answer

PHP references and performance

I read some articles about PHP references and how they hurt performance. I also saw some tests, proving the same. Most of those resources, claim that reason for that is because references disable copy-on-write. But I don't understand why would that…
Ned
  • 3,961
  • 8
  • 31
  • 49
6
votes
2 answers

Downgrade class php 5.6 to 5.5

I founded a class to stack object layers and closures but my server isnt running on php 5.6 yet. And i was wondering how can i convert the ...$parameters because i cant fix it by replacing everything with call_user_func_array() then the…
M Beers
  • 71
  • 1
  • 7
6
votes
1 answer

late static binding in closure PHP5.5 vs 5.6

Why new static in the closure (in a class static method) is equal to new self in PHP5.5, while it's properly bound in PHP5.6 ? Given: abstract class Parent { public function __construct($something) { $this->something = $something; …
Jarek Tkaczyk
  • 78,987
  • 25
  • 159
  • 157
6
votes
2 answers

Self-calling anonymous function without declaring as variable

I want to call an anonymous function without declaring a variable for it. I know that this is a working example: $foo = function ($bar) use ($foo) { if (is_array($bar)) { foreach ($bar AS $current) { $foo($current); …
balintant
  • 2,774
  • 1
  • 19
  • 33
6
votes
1 answer

How to import static function with namespace in php?

class A declared at namespace1. namesapce namesapce1; class A { public static function fun1() { } } I want to use fun1() inside class B: namespace namesapce2; use ???? as fun1 class B { public static func2() { fun1(); …
david
  • 161
  • 3
  • 9
6
votes
2 answers

Where to find php_imagick.dll for php 5.5.12 for Windows wampserver 2.5?

I am using Wampserver 2.5 on my Windows 7 (32 bit) and my PHP version is 5.5.12. I am unable to use IMAGICK. I have installed IMAGICK version 6.8.9 on my system and it works like charm on the command line. Further, I have followed instructions to…
Mike Kevin
  • 86
  • 1
  • 1
  • 5
6
votes
2 answers

After upgrading Apache and PHP a certain function causes segmentation fault

I am manually migrating this question from drupal.stackexchange.com (has since been deleted). I recently upgraded my local dev environment (Vagrant, Ubuntu 12.04) from PHP 5.3.X to 5.5.14 and Apache 2.2.X to 2.4.9. After the upgrade, whenever I the…
donut
  • 9,427
  • 5
  • 36
  • 53
5
votes
1 answer

How many queries can be used in a single MySQL or MariaDB transaction

How many queries can be used in a single MySQL/MariaDB transaction? Is there any limit for the number of queries used in a transaction? Currently I have tested with a large ZF1 project, a transaction with 175,000+ queries, and its working fine! The…
rajukoyilandy
  • 5,341
  • 2
  • 20
  • 31
5
votes
3 answers

PHP Array Search Return Multiple Keys

I'm trying to search an array and return multiple keys "1","b"=>"2","c"=>"2"); echo array_search("2",$a); ?> With the code above it only returns b, how can I get I to return b and c?
Mike Johnston
  • 161
  • 1
  • 1
  • 4
5
votes
1 answer

How do I autoload classes that have a file name different from the class name?

I have seen these, How to autoload class with a different filename? PHP Load a class with a different name than the one passed to the autoloader as argument I can change but in my MV* structure I have: /models customer.class.php …
johnny
  • 19,272
  • 52
  • 157
  • 259
5
votes
2 answers

Laravel view is not working

i am trying to learn laravel. I am facing problem with view. while i run this following code: Route::get('/', function(){ return 'welcome'; }); It works fine. But while i tried to use view Route::get('/', function(){ return…
Sahidul Islam
  • 489
  • 5
  • 18
5
votes
3 answers

Sharing dependency among classes while allowing dependency injection

I have two classes ClassA , ClassB Classes commonly depend upon two basic services and repositories ServiceA , ServiceB Classes (ClassA , ClassB) use DI principle to inject dependency using constructor. Since all three share a few common service…
Sushant
  • 1,354
  • 1
  • 14
  • 31
4
votes
1 answer

Simple try/finally vs. try/catch

With a simple function such as: function hello( $var ) { try { // do something with $var which may or may not throw an exception return $var; } finally { return $var; } } Is there any difference in…
MonkeyZeus
  • 20,375
  • 4
  • 36
  • 77
1 2
3
35 36