3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = substr("foo",3); if($foo !== FALSE){ echo "PHP 7\n"; echo gettype($foo); //string } else{ echo "PHP 5\n"; echo gettype($foo); //boolean }

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.1.70.0000.00717.44
8.1.60.0040.00417.61
8.1.50.0040.00417.49
8.1.40.0040.00417.55
8.1.30.0040.00417.67
8.1.20.0050.00217.48
8.1.10.0070.00017.40
8.1.00.0070.00317.48
8.0.200.0080.00016.89
8.0.190.0000.00816.83
8.0.180.0030.00516.87
8.0.170.0000.00816.82
8.0.160.0070.00016.72
8.0.150.0070.00016.73
8.0.140.0030.00316.86
8.0.130.0030.00513.34
8.0.120.0000.00716.75
8.0.110.0000.00716.88
8.0.100.0040.00416.89
8.0.90.0040.00416.75
8.0.80.0090.01316.81
8.0.70.0050.00316.87
8.0.60.0040.00416.83
8.0.50.0000.00716.98
8.0.30.0080.01217.19
8.0.20.0110.00817.40
8.0.10.0000.00817.02
8.0.00.0060.01116.77
7.4.300.0070.00016.48
7.4.290.0000.00716.58
7.4.280.0000.00816.63
7.4.270.0070.00016.50
7.4.260.0030.00316.57
7.4.250.0040.00416.54
7.4.240.0070.00016.56
7.4.230.0070.00016.39
7.4.220.0160.00716.49
7.4.210.0080.00916.48
7.4.200.0040.00416.39
7.4.160.0100.00916.54
7.4.150.0070.01117.40
7.4.140.0110.00817.86
7.4.130.0180.00416.48
7.4.120.0130.00916.55
7.4.110.0100.00716.57
7.4.100.0100.00616.39
7.4.90.0000.01716.55
7.4.80.0070.01019.39
7.4.70.0070.01016.52
7.4.60.0100.00716.63
7.4.50.0070.01116.36
7.4.40.0040.01916.48
7.4.30.0060.01016.34
7.4.00.0030.01014.89
7.3.330.0000.00613.14
7.3.320.0050.00013.09
7.3.310.0000.00816.07
7.3.300.0030.00316.09
7.3.290.0030.00316.24
7.3.280.0100.00816.25
7.3.270.0000.01717.40
7.3.260.0150.00816.32
7.3.240.0100.00716.33
7.3.230.0030.01416.36
7.3.210.0110.00716.33
7.3.200.0170.00016.32
7.3.190.0150.00416.15
7.3.180.0130.00616.64
7.3.170.0060.01616.62
7.3.160.0090.00616.33
7.2.330.0100.00716.57
7.2.320.0060.01116.71
7.2.310.0080.00816.51
7.2.300.0110.00616.70
7.2.290.0060.01016.64
7.2.60.0100.00716.69
7.2.00.0040.00819.24
7.1.200.0030.00715.70
7.1.70.0030.00717.31
7.1.60.0040.00817.22
7.1.50.0030.02116.84
7.1.40.0100.01734.26
7.1.30.0170.01334.09
7.1.20.0100.02034.45
7.1.10.0000.01316.53
7.1.00.0030.01316.55
7.0.200.0090.00616.50
7.0.180.0000.01016.19
7.0.170.0070.01016.22
7.0.160.0030.01016.08
7.0.150.0000.01016.00
7.0.140.0070.00716.29
7.0.130.0030.01016.28
7.0.120.0030.01016.38
7.0.110.0000.01716.16
7.0.100.0000.01716.32
7.0.90.0070.00716.30
7.0.80.0000.01316.19
7.0.70.0030.01316.14
7.0.60.0030.01015.72
7.0.50.0000.01716.21
7.0.40.0070.01016.13
7.0.30.0100.00716.37
7.0.20.0000.01316.45
7.0.10.0030.01016.32
7.0.00.0070.01016.47

preferences:
11.27 ms | 406 KiB | 5 Q