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); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.70.1600.07720.01
7.0.60.1630.06319.77
7.0.50.1170.05320.34
7.0.40.1270.05020.41
7.0.30.0630.08720.27
7.0.20.1500.07020.39
7.0.10.1330.07320.30
7.0.00.1370.05720.29
5.6.220.0930.06020.79
5.6.210.1270.08320.52
5.6.200.1070.07021.00
5.6.190.1270.06021.20
5.6.180.0730.05321.07
5.6.170.1230.08021.01
5.6.160.1130.05721.03
5.6.150.1100.05721.07
5.6.140.0970.06721.09
5.6.130.1000.06021.16
5.6.120.1170.07021.17
5.6.110.1430.05720.96
5.6.100.1430.07021.17
5.6.90.1270.06020.97
5.6.80.1370.05720.41
5.6.70.1000.05720.54
5.6.60.1170.05320.37
5.6.50.0930.07020.48
5.6.40.1470.06720.50
5.6.30.0970.05720.56
5.6.20.1070.06720.37
5.6.10.0130.05720.35
5.6.00.0100.06320.51
5.5.360.0930.06020.37
5.5.350.1330.06320.37
5.5.340.0970.05720.83
5.5.330.1100.05720.94
5.5.320.0100.05720.89
5.5.310.1200.08720.93
5.5.300.0800.07320.79
5.5.290.1300.06020.88
5.5.280.0370.08720.93
5.5.270.1230.06020.84
5.5.260.1130.05320.82
5.5.250.1200.07720.51
5.5.240.1170.05720.24
5.5.230.1130.06020.35
5.5.220.0900.06320.35
5.5.210.1230.06020.30
5.5.200.1400.06320.18
5.5.190.1070.05720.18
5.5.180.1200.05720.32
5.5.160.1670.07720.44
5.5.150.1470.08020.34
5.5.140.1500.07720.32
5.5.130.1430.07720.32
5.5.120.1270.07720.19
5.5.110.1270.08320.20
5.5.100.1270.05720.04
5.5.90.1300.05320.12
5.5.80.1300.05320.13
5.5.70.1070.06720.11
5.5.60.1330.05720.23
5.5.50.1500.07320.14
5.5.40.1370.06020.11
5.5.30.1430.07020.11
5.5.20.1430.05719.99
5.5.10.0970.06020.08
5.5.00.1030.05020.08

preferences:
150.18 ms | 1398 KiB | 7 Q