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 'Testfour is empty'.gettype($testfour); else echo "Testfour's not empty"; var_dump($testfour); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: fopen(): php_network_getaddresses: getaddrinfo for ya.ru failed: System error in /in/r9jAX on line 7 Warning: fopen(http://ya.ru): Failed to open stream: php_network_getaddresses: getaddrinfo for ya.ru failed: System error in /in/r9jAX on line 7 Foo is empty - string Warning: Undefined variable $bar in /in/r9jAX on line 11 Bar is empty too - NULLTestone is empty - integerTesttwo is empty - doubleTestthree is empty - arrayTestfour is emptybooleanbool(false)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
78.8 ms | 402 KiB | 8 Q