PHP 5.3 and 5.4 compatibility

Issue #2 resolved
Matthias Zaunseder created an issue

Hi again and sorry for spamming :)

I'm using PHP 5.4.12 and the encode method returns null because the $depth parameter is not recognized in this PHP version. Also the decode method could be problematic for PHP 5.3 users because the $options parameter was added in 5.4.

Or are you just supporting PHP 5.5+ ? Because in your composer.json you are explicitly supporting PHP from 5.3 upwards.

Thanks in advance for a reply.

Comments (4)

  1. Simon Hampel repo owner

    Well that was embarrassing - when I used phpbrew to test against different versions of PHP, I discovered a massive number of problems with my code.

    I've now created versions of this package specifically for PHP 5.3, PHP 5.4 and PHP 5.5 ... if you are requiring "hampel/json": "~2.0", you should theoretically get the most appropriate version for you depending on your PHP version

  2. Log in to comment