3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $value = 5; $value = decbin($config->getValue() ?: 0); while (strlen($value) < 3) { $value = 0 . $value; } $value = str_pad($value, 4 - strlen($value), "0", STR_PAD_LEFT); var_dump($value);
Output for 7.0.5 - 7.2.0
Notice: Undefined variable: config in /in/lnjhP on line 5 Fatal error: Uncaught Error: Call to a member function getValue() on null in /in/lnjhP:5 Stack trace: #0 {main} thrown in /in/lnjhP on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: config in /in/lnjhP on line 5 Fatal error: Uncaught Error: Call to a member function getValue() on unknown in /in/lnjhP:5 Stack trace: #0 {main} thrown in /in/lnjhP on line 5
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Notice: Undefined variable: config in /in/lnjhP on line 5 Fatal error: Call to a member function getValue() on null in /in/lnjhP on line 5
Process exited with code 255.
Output for 5.3.21 - 5.5.35
Notice: Undefined variable: config in /in/lnjhP on line 5 Fatal error: Call to a member function getValue() on a non-object in /in/lnjhP on line 5
Process exited with code 255.