3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $config = json_decode('{"db":{"driver":"mysql","database":"store_derpstation","host":"lemonstand.cnxuvxihm3xz.us-east-1.rds.amazonaws.com","username":"derpstation","password":"b92db464d96d30b5cb17276c079d562d","charset":"utf8","collation":"utf8_unicode_ci"},"locale":"en","timezone":"America\/Vancouver","active theme":"alpha","themes":"\/var\/www\/staging\/storage\/0558ef36323a2b17dc5be707a4222b4f\/themes\/","resources":"\/var\/www\/staging\/storage\/0558ef36323a2b17dc5be707a4222b4f\/resources\/","uploaded":"\/var\/www\/staging\/storage\/0558ef36323a2b17dc5be707a4222b4f\/uploaded\/","php views":true,"payment entered":false,"paid until":false}'); $name = 'payment entered'; echo $config->$name; var_dump($config);
Output for 7.0.0 - 7.1.0
object(stdClass)#2 (10) { ["db"]=> object(stdClass)#1 (7) { ["driver"]=> string(5) "mysql" ["database"]=> string(17) "store_derpstation" ["host"]=> string(51) "lemonstand.cnxuvxihm3xz.us-east-1.rds.amazonaws.com" ["username"]=> string(11) "derpstation" ["password"]=> string(32) "b92db464d96d30b5cb17276c079d562d" ["charset"]=> string(4) "utf8" ["collation"]=> string(15) "utf8_unicode_ci" } ["locale"]=> string(2) "en" ["timezone"]=> string(17) "America/Vancouver" ["active theme"]=> string(5) "alpha" ["themes"]=> string(65) "/var/www/staging/storage/0558ef36323a2b17dc5be707a4222b4f/themes/" ["resources"]=> string(68) "/var/www/staging/storage/0558ef36323a2b17dc5be707a4222b4f/resources/" ["uploaded"]=> string(67) "/var/www/staging/storage/0558ef36323a2b17dc5be707a4222b4f/uploaded/" ["php views"]=> bool(true) ["payment entered"]=> bool(false) ["paid until"]=> bool(false) }
Output for 5.2.0 - 5.6.28
object(stdClass)#1 (10) { ["db"]=> object(stdClass)#2 (7) { ["driver"]=> string(5) "mysql" ["database"]=> string(17) "store_derpstation" ["host"]=> string(51) "lemonstand.cnxuvxihm3xz.us-east-1.rds.amazonaws.com" ["username"]=> string(11) "derpstation" ["password"]=> string(32) "b92db464d96d30b5cb17276c079d562d" ["charset"]=> string(4) "utf8" ["collation"]=> string(15) "utf8_unicode_ci" } ["locale"]=> string(2) "en" ["timezone"]=> string(17) "America/Vancouver" ["active theme"]=> string(5) "alpha" ["themes"]=> string(65) "/var/www/staging/storage/0558ef36323a2b17dc5be707a4222b4f/themes/" ["resources"]=> string(68) "/var/www/staging/storage/0558ef36323a2b17dc5be707a4222b4f/resources/" ["uploaded"]=> string(67) "/var/www/staging/storage/0558ef36323a2b17dc5be707a4222b4f/uploaded/" ["php views"]=> bool(true) ["payment entered"]=> bool(false) ["paid until"]=> bool(false) }
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/GsD6a on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/GsD6a on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/GsD6a on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/GsD6a on line 3