Skip to content

Version 1.2

Compare
Choose a tag to compare
@EmielBruijntjes EmielBruijntjes released this 26 Aug 12:03
· 454 commits to master since this release

This is mainly a bugfix version + some new features and change in behavior of some functions.

  • New feature: Php::Value objects can now also be compared with other Php::Value objects using C++ comparison operators like ==, <, >, etcetera.
  • Fix: magic methods were not working for objects created with Php::Object("MyClass", new MyClass())
  • Fix: moving nullptr to a Php::Value object caused a crash
  • Fix: infinite loop when compariting value objects with each other using operator ==
  • New feature: A C++ class does no longer have to have a default constructor to be usable from PHP
  • Changed behavior: PHP-CPP used to throw PHP exceptions to user space when an error occured, while the Zend engine would trigger a fatal error in similar situations and stop further execution. This was a difference between PHP-CPP and the Zend engine. This has been changed: now PHP-CPP also triggers fatal errors when the programmer makes a mistake (instead of throwing exceptions).
  • Fix: methods and properties from base classes were not available in derived classes
  • New feature: Php::eval() function
  • New feature: Php::class_exists() function
  • New feature: Php::is_a() and Php::is_subclass_of() functions
  • New feature: Methods Php::Value::instanceOf() and Php::Value::derivedFrom()
  • Fix: creating a Php::Value based on a std::map would not result in an array variable being created
  • Fix: for objects created using Php::Object() constructor, the __construct() method was not called
  • Fix: traversing through array properties was not always working when property names started with a null byte
  • Fix: casting a Php::value holding an array to a map with string keys, will now turn the keys into numeric string keys ("1", "2", etcetera)
  • Fix: "apachectl reload" caused a crash on PHP 5.3 environments
  • Changed behavior: setting or retrieving properties of a Php::Value that start with a null byte (to rely on the Zend implementation of private properties) will no longer work (PHP-CPP users should never rely on specific Zend features)