3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = substr("foo",3); if(strlen($foo) == 0){ echo "Run on both PHP 5 and PHP 7\n"; echo gettype($foo); //boolean on PHP 5 and string on PHP 7 }

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.43
8.1.60.0000.00717.48
8.1.50.0050.00317.50
8.1.40.0060.00317.52
8.1.30.0040.00417.65
8.1.20.0000.00817.68
8.1.10.0050.00217.40
8.1.00.0070.00417.37
8.0.200.0060.00316.77
8.0.190.0060.00316.89
8.0.180.0070.00016.84
8.0.170.0030.00516.91
8.0.160.0050.00316.80
8.0.150.0040.00416.79
8.0.140.0040.00316.84
8.0.130.0000.00913.35
8.0.120.0000.00716.74
8.0.110.0000.00716.79
8.0.100.0000.00816.83
8.0.90.0000.00717.00
8.0.80.0090.00916.80
8.0.70.0080.00016.84
8.0.60.0030.00516.77
8.0.50.0040.00416.99
8.0.30.0130.00617.08
8.0.20.0100.00917.40
8.0.10.0070.00017.12
8.0.00.0140.00816.62
7.4.300.0040.00416.49
7.4.290.0090.00016.45
7.4.280.0040.00416.63
7.4.270.0070.00016.58
7.4.260.0000.00916.58
7.4.250.0030.00316.44
7.4.240.0020.00516.44
7.4.230.0070.00016.70
7.4.220.0050.00216.35
7.4.210.0130.00516.50
7.4.200.0050.00216.67
7.4.160.0120.00816.43
7.4.150.0130.00317.40
7.4.140.0140.00817.86
7.4.130.0000.02116.54
7.4.120.0090.01016.61
7.4.110.0170.00416.75
7.4.100.0120.00616.48
7.4.90.0080.00816.48
7.4.80.0090.00919.39
7.4.70.0160.00416.52
7.4.60.0000.01816.51
7.4.50.0060.00616.67
7.4.40.0110.01116.43
7.4.30.0030.01516.35
7.4.00.0070.00914.92
7.3.330.0020.00213.16
7.3.320.0050.00013.04
7.3.310.0040.00416.38
7.3.300.0040.00416.30
7.3.290.0100.00316.35
7.3.280.0100.01016.31
7.3.270.0030.01417.40
7.3.260.0090.01216.43
7.3.240.0120.00716.39
7.3.230.0060.01116.33
7.3.210.0060.01016.68
7.3.200.0130.00316.21
7.3.190.0040.01816.39
7.3.180.0030.01316.58
7.3.170.0130.00616.31
7.3.160.0070.00816.42
7.3.120.0100.00914.81
7.3.110.0090.00714.50
7.3.100.0080.00714.80
7.3.90.0080.00714.69
7.3.80.0020.01414.62
7.3.70.0060.00714.76
7.3.60.0060.00714.71
7.3.50.0060.00614.75
7.3.40.0080.00414.72
7.3.30.0090.00514.75
7.3.20.0060.00916.61
7.3.10.0070.00716.57
7.3.00.0060.00816.64
7.2.330.0190.00416.51
7.2.320.0080.00816.54
7.2.310.0030.01316.77
7.2.300.0100.00716.38
7.2.290.0060.01016.55
7.2.250.0080.00914.92
7.2.240.0060.01114.88
7.2.230.0060.01114.87
7.2.220.0080.00815.06
7.2.210.0050.00814.87
7.2.200.0050.00815.07
7.2.190.0060.00815.01
7.2.180.0060.00814.98
7.2.170.0080.00615.12
7.2.160.0070.01014.54
7.2.150.0070.00716.92
7.2.140.0040.01216.84
7.2.130.0080.00617.02
7.2.120.0050.00516.91
7.2.110.0070.01016.47
7.2.100.0060.00916.96
7.2.90.0000.01316.53
7.2.80.0110.00416.72
7.2.70.0030.01016.95
7.2.60.0090.00316.92
7.2.50.0110.00416.81
7.2.40.0040.00716.66
7.2.30.0000.01216.83
7.2.20.0030.01216.62
7.2.10.0030.00716.73
7.2.00.0020.00818.09
7.1.330.0060.01015.84
7.1.320.0060.00715.53
7.1.310.0090.00315.66
7.1.300.0070.00615.62
7.1.290.0030.00715.68
7.1.280.0010.01115.72
7.1.270.0040.00915.50
7.1.260.0030.01015.55
7.1.250.0030.01315.69
7.1.240.0040.01115.73
7.1.230.0030.00715.88
7.1.220.0040.00715.37
7.1.210.0070.00715.83
7.1.200.0020.00915.62
7.1.190.0090.00315.45
7.1.180.0030.00615.80
7.1.170.0030.00715.46
7.1.160.0030.00915.51
7.1.150.0000.01115.51
7.1.140.0000.00815.86
7.1.130.0060.00615.63
7.1.120.0040.00715.73
7.1.110.0100.00315.66
7.1.100.0060.00915.54
7.1.90.0040.01215.70
7.1.80.0090.00015.68
7.1.70.0040.00616.48
7.1.60.0090.00516.60
7.1.50.0080.00816.27
7.1.40.0130.00824.91
7.1.30.0130.01125.09
7.1.20.0150.01225.11
7.1.10.0050.00916.13
7.1.00.0020.01016.14
7.0.330.0090.00015.39
7.0.320.0100.00615.02
7.0.310.0000.00815.11
7.0.300.0080.00415.30
7.0.290.0070.00315.48
7.0.280.0140.00014.99
7.0.270.0070.00715.48
7.0.260.0030.01015.37
7.0.250.0060.00615.46
7.0.240.0070.01015.25
7.0.230.0070.00315.54
7.0.220.0040.00815.33
7.0.210.0030.00915.12
7.0.200.0080.00315.84
7.0.190.0040.00715.35
7.0.180.0070.01015.70
7.0.170.0130.00715.82
7.0.160.0000.01115.85
7.0.150.0000.01115.68
7.0.140.0020.00915.68
7.0.130.0050.00915.84
7.0.120.0050.00815.90
7.0.110.0050.00915.78
7.0.100.0050.00815.84
7.0.90.0060.00615.75
7.0.80.0050.00715.86
7.0.70.0000.01415.71
7.0.60.0060.00715.73
7.0.50.0050.00915.86
7.0.40.0040.00914.98
7.0.30.0070.00915.01
7.0.20.0020.00914.88
7.0.10.0080.00514.75
7.0.00.0030.01114.90
5.6.400.0070.00714.37
5.6.390.0000.01314.05
5.6.380.0070.01014.46
5.6.370.0040.01114.39
5.6.360.0000.01514.05
5.6.350.0030.00614.32
5.6.340.0080.00314.29
5.6.330.0030.00614.02
5.6.320.0090.00614.30
5.6.310.0140.00014.30
5.6.300.0030.01114.41
5.6.290.0000.01714.14
5.6.280.0060.00914.03
5.6.270.0100.00314.36
5.6.260.0060.00614.39
5.6.250.0060.00314.38
5.6.240.0000.01314.54
5.6.230.0000.01314.32
5.6.220.0070.00714.50
5.6.210.0030.00914.07
5.6.200.0030.01014.07
5.6.190.0090.00014.13
5.6.180.0030.01014.26
5.6.170.0070.00714.48
5.6.160.0060.01213.96
5.6.150.0070.00713.84
5.6.140.0100.00314.33
5.6.130.0130.00314.20
5.6.120.0070.01014.23
5.6.110.0060.00814.07
5.6.100.0070.00414.43
5.6.90.0100.00013.90
5.6.80.0100.00314.08
5.6.70.0070.00713.80
5.6.60.0000.01414.02
5.6.50.0070.00714.23
5.6.40.0060.00614.05
5.6.30.0040.00714.38
5.6.20.0000.01014.00
5.6.10.0060.01013.83
5.6.00.0060.00614.05

preferences:
12.03 ms | 406 KiB | 5 Q