3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = ''; $testone = 0; $testtwo = 0.0; $testthree = array(); $testfour = fopen("http://ya.ru", "r"); if(empty($foo)) echo "Foo is empty - ". gettype($foo); // Foo is empty - string if(empty($bar)) echo 'Bar is empty too - '. gettype($bar); // Notice: Undefined variable: bar in /in/kCIj8 on line 7 Bar is empty too - NULL if(empty($testone)) echo 'Testone is empty - '.gettype($testone); if(empty($testtwo)) echo 'Testtwo is empty - '.gettype($testtwo); if(empty($testthree)) echo 'Testthree is empty - '.gettype($testthree); if(empty($testfour)) echo 'Testtwo is empty'..gettype($testthree); else echo "Testfour's not empty -".var_dump($testfour); ?>
Output for 5.5.0 - 5.5.36, 5.6.0 - 5.6.22, 7.0.0 - 7.0.7
Parse error: syntax error, unexpected '.' in /in/XZts8 on line 19
Process exited with code 255.

preferences:
204.86 ms | 1395 KiB | 74 Q