3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1); function pass_float(float $x) { echo "why?"; } $i = 1; if(gettype($i) == "integer") { pass_float($int_value); }
based on SfeqV
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: int_value in /in/LFZHJ on line 10 Fatal error: Uncaught TypeError: Argument 1 passed to pass_float() must be of the type float, null given, called in /in/LFZHJ on line 10 and defined in /in/LFZHJ:4 Stack trace: #0 /in/LFZHJ(10): pass_float(NULL) #1 {main} thrown in /in/LFZHJ on line 4
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Warning: Unsupported declare 'strict_types' in /in/LFZHJ on line 2 Notice: Undefined variable: int_value in /in/LFZHJ on line 10 Catchable fatal error: Argument 1 passed to pass_float() must be an instance of float, null given, called in /in/LFZHJ on line 10 and defined in /in/LFZHJ on line 4
Process exited with code 255.