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

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)
8.3.40.0180.00319.20
8.3.30.0090.00618.84
8.3.20.0060.00619.47
8.3.10.0040.00423.93
8.3.00.0000.00821.26
8.2.170.0110.00422.96
8.2.160.0100.00619.13
8.2.150.0090.00624.18
8.2.140.0080.00024.66
8.2.130.0080.00020.78
8.2.120.0080.00026.35
8.2.110.0030.00619.41
8.2.100.0040.00819.89
8.2.90.0060.00319.23
8.2.80.0030.00617.97
8.2.70.0040.00417.75
8.2.60.0040.00418.16
8.2.50.0080.00018.10
8.2.40.0040.00420.74
8.2.30.0050.00319.49
8.2.20.0080.00017.98
8.2.10.0050.00218.34
8.2.00.0040.00418.31
8.1.270.0000.00724.09
8.1.260.0100.00028.09
8.1.250.0030.00528.09
8.1.240.0090.00021.50
8.1.230.0040.00718.02
8.1.220.0060.00317.90
8.1.210.0030.00618.77
8.1.200.0060.00317.60
8.1.190.0000.00817.35
8.1.180.0030.00518.10
8.1.170.0000.01018.80
8.1.160.0070.00019.24
8.1.150.0030.00819.18
8.1.140.0000.00819.71
8.1.130.0070.00017.94
8.1.120.0000.00717.53
8.1.110.0000.00817.57
8.1.100.0040.00417.63
8.1.90.0040.00417.61
8.1.80.0080.00017.53
8.1.70.0030.00717.50
8.1.60.0030.00617.75
8.1.50.0050.00317.67
8.1.40.0040.00417.69
8.1.30.0040.00417.79
8.1.20.0000.01017.75
8.1.10.0040.00417.61
8.1.00.0000.00917.49
8.0.300.0040.00418.77
8.0.290.0030.00616.88
8.0.280.0070.00018.73
8.0.270.0000.00817.59
8.0.260.0040.00217.59
8.0.250.0030.00317.27
8.0.240.0070.00017.24
8.0.230.0000.01017.20
8.0.220.0060.00317.14
8.0.210.0070.00017.14
8.0.200.0000.00717.23
8.0.190.0000.01217.26
8.0.180.0020.00517.17
8.0.170.0000.00817.18
8.0.160.0030.00317.14
8.0.150.0000.00716.97
8.0.140.0030.00617.11
8.0.130.0000.00513.69
8.0.120.0040.00417.21
8.0.110.0000.00817.26
8.0.100.0040.00417.17
8.0.90.0040.00417.20
8.0.80.0040.01217.31
8.0.70.0080.00017.18
8.0.60.0060.00317.19
8.0.50.0040.00417.16
8.0.30.0090.00717.47
8.0.20.0110.01017.40
8.0.10.0000.00817.33
8.0.00.0090.00916.99
7.4.330.0050.00015.39
7.4.320.0050.00516.83
7.4.300.0000.00816.71
7.4.290.0080.00316.62
7.4.280.0030.00416.77
7.4.270.0000.00716.68
7.4.260.0030.00316.79
7.4.250.0000.00916.84
7.4.240.0050.00216.80
7.4.230.0000.00716.60
7.4.220.0070.01316.88
7.4.210.0030.01616.89
7.4.200.0000.00716.88
7.4.160.0030.01516.70
7.4.150.0130.01317.40
7.4.140.0090.01217.86
7.4.130.0050.01616.70
7.4.120.0120.01016.80
7.4.110.0060.01216.65
7.4.100.0070.01016.80
7.4.90.0040.01616.86
7.4.80.0030.01719.39
7.4.70.0110.01116.80
7.4.60.0130.00316.68
7.4.50.0100.00616.88
7.4.40.0070.01016.84
7.4.30.0110.00716.73
7.4.00.0080.00415.29
7.3.330.0040.00413.55
7.3.320.0000.00613.39
7.3.310.0000.00716.52
7.3.300.0050.00316.46
7.3.290.0120.00716.59
7.3.280.0060.01616.57
7.3.270.0110.00617.40
7.3.260.0080.01016.73
7.3.250.0160.00816.57
7.3.240.0090.00916.75
7.3.230.0140.00316.54
7.3.210.0170.00016.61
7.3.200.0100.00716.84
7.3.190.0120.00416.74
7.3.180.0150.00916.57
7.3.170.0070.01016.86
7.3.160.0100.00716.50
7.3.00.0110.00316.82
7.2.330.0080.01216.70
7.2.320.0070.01017.00
7.2.310.0170.00616.90
7.2.300.0110.00716.82
7.2.290.0030.01417.11
7.2.130.0080.00316.91
7.2.120.0060.00617.16
7.2.110.0030.00716.79
7.2.100.0060.00617.12
7.2.90.0080.00417.23
7.2.80.0060.00617.00
7.2.70.0030.01017.10
7.2.60.0050.00917.15
7.2.50.0030.01316.90
7.2.40.0070.00717.02
7.2.30.0060.00617.26
7.2.20.0110.00417.05
7.2.10.0090.00617.20
7.2.00.0070.00618.44
7.1.250.0030.00915.91
7.1.240.0090.00615.80
7.1.230.0070.00715.73
7.1.220.0090.00615.94
7.1.210.0000.01415.70
7.1.200.0050.00516.00
7.1.190.0080.00415.93
7.1.180.0110.00315.73
7.1.170.0060.00615.78
7.1.160.0030.00715.42
7.1.150.0030.01015.98
7.1.140.0060.00615.90
7.1.130.0030.01416.21
7.1.120.0030.01015.90
7.1.110.0040.00716.05
7.1.100.0060.00817.02
7.1.90.0060.00615.92
7.1.80.0090.00615.99
7.1.70.0090.00316.54
7.1.60.0050.01117.54
7.1.50.0070.01016.51
7.1.40.0000.01215.87
7.1.30.0060.00315.95
7.1.20.0110.00315.84
7.1.10.0090.00615.54
7.1.00.0030.04319.26
7.0.330.0070.00415.39
7.0.320.0040.00415.50
7.0.310.0090.00315.29
7.0.300.0150.00015.52
7.0.290.0000.01115.67
7.0.280.0080.00815.37
7.0.270.0030.01015.20
7.0.260.0070.00315.28
7.0.250.0030.00615.71
7.0.240.0060.00315.35
7.0.230.0040.00715.41
7.0.220.0060.00615.21
7.0.210.0120.00415.61
7.0.200.0240.00615.35
7.0.190.0040.00715.05
7.0.180.0060.00315.49
7.0.170.0000.01015.47
7.0.160.0070.01015.50
7.0.150.0050.00315.26
7.0.140.0080.00315.22
7.0.130.0000.01515.34
7.0.120.0070.01115.09
7.0.110.0040.00715.45
7.0.100.0070.00415.45
7.0.90.0030.00715.58
7.0.80.0070.00415.55
7.0.70.0080.03617.90
7.0.60.0650.03217.73
7.0.50.0670.04018.16
7.0.40.0680.03717.24
7.0.30.0600.03517.12
7.0.20.0830.04817.10
7.0.10.0680.04117.06
7.0.00.0780.04216.91
5.6.380.0000.00814.38
5.6.370.0040.00714.52
5.6.360.0130.00314.37
5.6.350.0110.00014.16
5.6.340.0100.00314.41
5.6.330.0030.01314.41
5.6.320.0060.00614.75
5.6.310.0090.00014.56
5.6.300.0090.00314.53
5.6.290.0000.01114.43
5.6.280.0040.04218.04
5.6.270.0100.00014.24
5.6.260.0090.00014.69
5.6.250.0030.00914.57
5.6.240.0040.00814.18
5.6.230.0110.00014.42
5.6.220.0640.03017.76
5.6.210.0090.03617.55
5.6.200.0630.04317.92
5.6.190.0530.04117.79
5.6.180.0660.03317.89
5.6.170.0620.03817.74
5.6.160.0750.05117.93
5.6.150.0630.03817.86
5.6.140.0680.03317.86
5.6.130.0600.03917.90
5.6.120.0130.03317.93
5.6.110.0440.03517.78
5.6.100.0610.03617.79
5.6.90.0650.03117.83
5.6.80.0670.03517.37
5.6.70.0620.02517.51
5.6.60.0640.03217.45
5.6.50.0620.03317.63
5.6.40.0620.03017.59
5.6.30.0690.02717.61
5.6.20.0730.04017.72
5.6.10.0700.03017.50
5.6.00.0630.03417.59
5.5.380.0030.00611.21
5.5.370.0040.00411.34
5.5.360.0350.03516.10
5.5.350.0580.04315.99
5.5.340.0570.05016.12
5.5.330.0480.04016.27
5.5.320.0550.03716.40
5.5.310.0520.03716.42
5.5.300.0750.03016.37
5.5.290.0720.03416.21
5.5.280.0080.03516.23
5.5.270.0720.03216.30
5.5.260.0700.03516.13
5.5.250.0570.03516.11
5.5.240.0680.02615.89
5.5.230.0630.03015.96
5.5.220.0710.03015.86
5.5.210.0580.03715.78
5.5.200.0630.02715.96
5.5.190.0630.03315.87
5.5.180.0650.03015.97
5.5.170.0060.00011.42
5.5.160.0660.03015.87
5.5.150.0700.02616.10
5.5.140.0600.03315.77
5.5.130.0620.03216.01
5.5.120.0720.02615.97
5.5.110.0600.03415.85
5.5.100.0610.03415.90
5.5.90.0630.03415.86
5.5.80.0760.02715.65
5.5.70.0720.02615.90
5.5.60.0620.03315.84
5.5.50.0620.03416.02
5.5.40.0680.03115.97
5.5.30.0760.03215.93
5.5.20.0650.04015.80
5.5.10.0780.03815.69
5.5.00.0650.03515.67

preferences:
60.06 ms | 400 KiB | 5 Q