3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $value = gmp_init(2); if (!isset($value)) return; if (is_null($value)) return; if (is_scalar($value) && $value === "") return; if (is_array($value) && count($value) == 0) return; if ($value != true && $value != false){ echo "true"; }else{ echo "false"; }
Output for 7.1.0 - 7.2.6
Recoverable fatal error: Object of class GMP could not be converted to boolean in /in/99vol on line 9
Process exited with code 255.
Output for 7.0.0 - 7.0.5, 7.0.14 - 7.0.20
Catchable fatal error: Object of class GMP could not be converted to boolean in /in/99vol on line 9
Process exited with code 255.
Output for 7.0.6
Fatal error: Uncaught Error: Call to undefined function gmp_init() in /in/99vol:2 Stack trace: #0 {main} thrown in /in/99vol on line 2
Process exited with code 255.
Output for 5.0.0 - 5.4.35, 5.5.35, 5.6.21
Fatal error: Call to undefined function gmp_init() in /in/99vol on line 2
Process exited with code 255.
Output for 5.6.8 - 5.6.20
true
Output for 5.4.36 - 5.5.34
false
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: gmp_init() in /in/99vol on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: gmp_init() in /in/99vol on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: gmp_init() in /in/99vol on line 2