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.4.10.0120.00317.57
8.3.140.0140.00416.45
8.3.130.0040.00418.49
8.3.120.0000.01920.77
8.3.110.0080.00016.75
8.3.100.0030.00624.06
8.3.90.0040.01126.77
8.3.80.0030.00617.97
8.3.70.0120.00618.43
8.3.60.0060.01318.30
8.3.50.0120.01021.09
8.3.40.0090.00618.63
8.3.30.0100.00318.59
8.3.20.0060.00320.13
8.3.10.0040.00421.76
8.3.00.0000.00819.00
8.2.250.0040.00416.47
8.2.240.0060.00319.04
8.2.230.0060.00320.94
8.2.220.0100.00037.54
8.2.210.0090.00926.77
8.2.200.0060.00616.34
8.2.190.0130.00616.63
8.2.180.0100.00718.04
8.2.170.0100.00722.96
8.2.160.0200.00019.38
8.2.150.0000.00724.18
8.2.140.0150.00024.66
8.2.130.0040.00426.16
8.2.120.0060.00320.97
8.2.110.0070.00422.33
8.2.100.0000.01217.78
8.2.90.0040.00417.84
8.2.80.0000.00818.03
8.2.70.0040.00417.63
8.2.60.0060.00317.38
8.2.50.0050.00318.10
8.2.40.0000.00719.34
8.2.30.0040.00419.24
8.2.20.0000.00718.04
8.2.10.0040.00418.10
8.2.00.0080.00018.13
8.1.300.0100.01019.91
8.1.290.0080.00330.84
8.1.280.0140.00425.92
8.1.270.0090.00021.98
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0080.00023.97
8.1.230.0110.00022.62
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0030.00517.23
8.1.190.0030.00517.23
8.1.180.0000.00918.10
8.1.170.0040.00418.30
8.1.160.0000.00718.95
8.1.150.0070.00020.16
8.1.140.0020.00519.50
8.1.130.0000.00818.88
8.1.120.0000.00817.46
8.1.110.0060.00317.45
8.1.100.0040.00417.45
8.1.90.0070.00317.43
8.1.80.0000.00717.32
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.300.0000.00719.98
8.0.290.0030.00616.63
8.0.280.0040.00418.48
8.0.270.0070.00016.89
8.0.260.0070.00018.92
8.0.250.0030.00316.88
8.0.240.0000.00716.93
8.0.230.0040.00416.89
8.0.220.0040.00416.86
8.0.210.0060.00016.82
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.330.0000.00515.55
7.4.320.0030.00516.56
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:
38.14 ms | 403 KiB | 5 Q