3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass{} $testobj = new MyClass; $teststring = ''; $testinteger = 0; $testfloat = 0.0; $testarray = array(); $testresource = fopen("http://ya.ru", "r"); $testboolean = false; if(empty($testobj)) echo "TestObj is empty - ". gettype($testobj); else var_dump($testobj); if(empty($testnull)) echo 'TestNUll is empty - '. gettype($testnull); // if(empty($teststring)) echo 'TestString is empty - '.gettype($teststring); // if(empty($testinteger)) echo 'TestInteger is empty - '.gettype($testinteger); if(empty($testfloat)) echo 'TestFloat is empty - '.gettype($testfloat); if(empty($testarray)) echo 'TestArray is empty'.gettype($testarray); if(empty($testresource)) echo 'TestResource is empty'.gettype($testresource); else echo "TestResource is not empty"; var_dump($testresource); if(empty($testboolean)) echo 'TestFloat is empty - '.gettype($testboolean); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: fopen(): php_network_getaddresses: getaddrinfo for ya.ru failed: System error in /in/JOs3A on line 8 Warning: fopen(http://ya.ru): Failed to open stream: php_network_getaddresses: getaddrinfo for ya.ru failed: System error in /in/JOs3A on line 8 object(MyClass)#1 (0) { } Warning: Undefined variable $testnull in /in/JOs3A on line 17 TestNUll is empty - NULLTestString is empty - stringTestInteger is empty - integerTestFloat is empty - doubleTestArray is emptyarrayTestResource is emptybooleanbool(false) TestFloat is empty - boolean

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:
56.67 ms | 402 KiB | 8 Q