3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'a12'; $secondchar = substr($str, 1, 1); if (!is_string($secondchar)) { echo $secondchar . ' is a not string'; } else { echo $secondchar . ' is a string'; }

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.60.0040.01118.30
8.3.50.0090.01122.05
8.3.40.0080.00818.59
8.3.30.0070.00718.96
8.3.20.0030.00520.21
8.3.10.0080.00023.54
8.3.00.0040.00420.90
8.2.180.0100.00618.06
8.2.170.0150.00022.96
8.2.160.0180.00420.53
8.2.150.0050.00324.18
8.2.140.0000.00724.66
8.2.130.0070.00726.16
8.2.120.0040.00419.36
8.2.110.0100.00022.24
8.2.100.0110.00020.39
8.2.90.0000.00919.23
8.2.80.0040.00417.97
8.2.70.0000.01017.63
8.2.60.0050.00517.93
8.2.50.0140.00318.07
8.2.40.0040.00419.75
8.2.30.0000.00718.27
8.2.20.0080.00017.67
8.2.10.0000.00818.14
8.2.00.0080.00017.78
8.1.280.0090.00625.92
8.1.270.0040.00423.84
8.1.260.0000.00826.35
8.1.250.0030.00628.09
8.1.240.0070.00323.69
8.1.230.0060.00619.10
8.1.220.0000.00717.79
8.1.210.0000.00818.77
8.1.200.0070.00417.23
8.1.190.0040.00417.11
8.1.180.0030.00618.10
8.1.170.0000.00918.66
8.1.160.0000.00721.91
8.1.150.0070.00018.73
8.1.140.0000.00717.50
8.1.130.0030.00319.52
8.1.120.0000.00017.34
8.1.110.0040.00417.48
8.1.100.0000.00717.42
8.1.90.0000.00717.42
8.1.80.0080.00017.46
8.1.70.0000.00717.45
8.1.60.0080.00017.48
8.1.50.0040.00417.46
8.1.40.0050.00317.56
8.1.30.0000.00817.62
8.1.20.0050.00217.60
8.1.10.0000.00817.52
8.1.00.0040.00417.38
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00818.33
8.0.270.0040.00417.15
8.0.260.0030.00317.12
8.0.250.0000.00717.00
8.0.240.0040.00416.91
8.0.230.0000.00716.97
8.0.220.0030.00316.77
8.0.210.0070.00016.75
8.0.200.0030.00316.95
8.0.190.0050.00316.94
8.0.180.0030.00516.89
8.0.170.0000.00816.92
8.0.160.0000.00716.90
8.0.150.0000.00716.79
8.0.140.0000.00816.71
8.0.130.0000.00513.33
8.0.120.0040.00416.82
8.0.110.0040.00416.91
8.0.100.0000.00716.73
8.0.90.0030.00616.93
8.0.80.0100.01016.88
8.0.70.0000.00816.90
8.0.60.0070.00016.71
8.0.50.0000.00716.81
8.0.30.0120.00617.05
8.0.20.0130.00617.40
8.0.10.0080.00017.01
8.0.00.0130.00516.88
7.4.330.0050.00015.05
7.4.320.0030.00316.59
7.4.300.0030.00316.56
7.4.290.0030.00316.51
7.4.280.0080.00016.61
7.4.270.0040.00416.57
7.4.260.0040.00416.58
7.4.250.0020.00516.39
7.4.240.0020.00516.44
7.4.230.0040.00416.33
7.4.220.0100.00716.61
7.4.210.0100.00716.63
7.4.200.0040.00416.36
7.4.160.0040.01116.55
7.4.150.0110.00517.40
7.4.140.0060.01517.86
7.4.130.0090.01216.53
7.4.120.0100.01016.40
7.4.110.0150.00316.72
7.4.100.0040.01416.37
7.4.90.0130.00616.32
7.4.80.0170.00719.39
7.4.70.0110.00416.47
7.4.60.0100.00716.43
7.4.50.0000.00816.36
7.4.40.0060.00916.53
7.4.30.0110.01116.55
7.4.00.0070.00614.82
7.3.330.0000.00612.95
7.3.320.0060.00012.92
7.3.310.0000.00716.14
7.3.300.0030.00316.18
7.3.290.0030.01116.21
7.3.280.0100.00816.19
7.3.270.0070.01017.40
7.3.260.0170.00016.33
7.3.250.0100.01016.25
7.3.240.0110.00716.25
7.3.230.0120.00416.39
7.3.210.0100.00716.40
7.3.200.0030.01219.39
7.3.190.0140.00716.39
7.3.180.0090.00616.40
7.3.170.0030.01316.32
7.3.160.0040.01216.41
7.3.120.0050.01014.76
7.3.110.0090.00814.64
7.3.100.0080.00814.68
7.3.90.0060.01214.90
7.3.80.0040.01014.90
7.3.70.0050.00914.71
7.3.60.0110.00514.70
7.3.50.0080.00814.78
7.3.40.0030.01114.86
7.3.30.0020.01114.76
7.3.20.0050.01016.45
7.3.10.0090.00516.61
7.3.00.0070.00616.66
7.2.330.0130.01016.37
7.2.320.0070.01016.43
7.2.310.0030.02016.76
7.2.300.0070.01016.71
7.2.290.0100.01016.57
7.2.250.0090.01014.98
7.2.240.0050.01314.96
7.2.230.0020.01014.94
7.2.220.0070.00914.82
7.2.210.0070.00914.96
7.2.200.0070.00715.20
7.2.190.0050.01015.08
7.2.180.0030.01114.85
7.2.170.0090.00415.03
7.2.130.0000.01416.92
7.2.120.0110.00716.99
7.2.110.0040.01117.01
7.2.100.0060.00316.58
7.2.90.0060.00916.88
7.2.80.0100.00716.91
7.2.70.0070.00416.93
7.2.60.0060.00917.00
7.2.50.0000.01317.06
7.2.40.0070.00717.02
7.2.30.0040.01117.00
7.2.20.0090.00616.85
7.2.10.0100.00317.05
7.2.00.0030.01118.17
7.1.330.0080.00815.86
7.1.320.0070.00715.56
7.1.310.0030.01015.75
7.1.300.0060.00815.71
7.1.290.0110.00315.69
7.1.280.0060.00815.57
7.1.270.0020.01215.71
7.1.260.0030.00815.79
7.1.250.0060.00315.93
7.1.200.0000.01415.73
7.1.100.0150.00018.35
7.1.70.0090.00317.13
7.1.60.0140.01019.70
7.1.50.0060.01916.79
7.1.00.0000.07722.48
7.0.200.0000.00916.83
7.0.140.0100.06722.07
7.0.80.0530.07319.96
7.0.70.0170.03719.91
7.0.60.0470.05719.78
7.0.50.0430.04720.29
7.0.40.0100.08320.09
7.0.30.0130.08020.09
7.0.20.0070.04019.99
7.0.10.0100.06720.09
7.0.00.0070.05020.10
5.6.280.0030.07320.89
5.6.230.0070.04020.74
5.6.220.0100.07020.73
5.6.210.0100.07020.56
5.6.200.0000.05321.02
5.6.190.0130.07321.06
5.6.180.0030.05021.05
5.6.170.0070.04021.00
5.6.160.0000.03721.07
5.6.150.0030.05321.04
5.6.140.0100.03021.10
5.6.130.0030.03321.08
5.6.120.0070.04021.05
5.6.110.0070.07321.16
5.6.100.0100.05321.05
5.6.90.0030.06021.03
5.6.80.0070.07020.38
5.6.70.0070.03320.41
5.6.60.0070.03720.47
5.6.50.0000.04320.39
5.6.40.0000.05720.35
5.6.30.0030.04720.53
5.6.20.0130.02720.43
5.6.10.0030.04720.37
5.6.00.0070.03720.36
5.5.370.0130.03720.39
5.5.360.0070.04720.53
5.5.350.0100.08020.37
5.5.340.0100.07720.89
5.5.330.0130.04720.87
5.5.320.0070.04320.79
5.5.310.0030.04320.91
5.5.300.0130.03020.78
5.5.290.0070.03720.79
5.5.280.0000.04020.79
5.5.270.0070.03720.78
5.5.260.0030.04020.87
5.5.250.0130.06720.73
5.5.240.0030.04320.30
5.5.230.0030.04020.29
5.5.220.0070.03020.14
5.5.210.0030.03320.30
5.5.200.0000.04020.14
5.5.190.0000.04320.14
5.5.180.0030.04020.17
5.5.160.0000.04320.24
5.5.150.0000.03720.07
5.5.140.0000.03720.17
5.5.130.0030.03720.20
5.5.120.0070.03320.22
5.5.110.0030.04020.17
5.5.100.0030.04720.17
5.5.90.0000.03320.07
5.5.80.0130.02719.94
5.5.70.0000.04020.16
5.5.60.0030.03720.15
5.5.50.0070.03320.05
5.5.40.0000.03720.05
5.5.30.0030.04020.04
5.5.20.0030.04720.11
5.5.10.0200.03320.05
5.5.00.0130.06320.02
5.4.450.0030.04019.44
5.4.440.0030.04019.42
5.4.430.0070.03719.44
5.4.420.0070.03719.41
5.4.410.0000.04019.23
5.4.400.0000.04019.03
5.4.390.0030.03719.10
5.4.380.0030.03318.98
5.4.370.0030.03719.12
5.4.360.0030.03718.96
5.4.350.0030.05019.04
5.4.340.0000.04319.11
5.4.320.0000.03719.08
5.4.310.0000.04019.03
5.4.300.0030.04018.96
5.4.290.0030.03719.04
5.4.280.0030.03719.03
5.4.270.0000.04018.81
5.4.260.0030.03019.02
5.4.250.0000.03318.95
5.4.240.0030.03019.23
5.4.230.0070.03318.79
5.4.220.0000.04019.11
5.4.210.0070.03019.04
5.4.200.0070.04019.02
5.4.190.0100.05019.03
5.4.180.0070.04319.22
5.4.170.0100.07318.77
5.4.160.0030.08319.01
5.4.150.0000.04318.96
5.4.140.0030.04316.33
5.4.130.0130.07016.39
5.4.120.0070.07016.27
5.4.110.0030.07316.23
5.4.100.0000.04016.32
5.4.90.0070.03716.21
5.4.80.0070.04316.32
5.4.70.0030.05716.19
5.4.60.0030.07716.42
5.4.50.0030.07716.21
5.4.40.0030.06716.47
5.4.30.0070.03716.23
5.4.20.0000.04316.36
5.4.10.0000.07016.40
5.4.00.0070.07716.14
5.3.290.0030.04016.14
5.3.280.0070.03316.14
5.3.270.0100.07316.14
5.3.260.0070.04016.14
5.3.250.0000.08016.14
5.3.240.0030.04016.14
5.3.230.0070.07716.14
5.3.220.0030.04316.14
5.3.210.0070.04316.14
5.3.200.0000.04316.14
5.3.190.0030.04016.14
5.3.180.0030.04016.14
5.3.170.0100.07016.14
5.3.160.0030.07316.14
5.3.150.0070.04016.14
5.3.140.0030.05716.14
5.3.130.0000.04316.14
5.3.120.0030.04716.14
5.3.110.0070.04316.14
5.3.100.0000.05716.14
5.3.90.0070.04316.14
5.3.80.0070.03716.14
5.3.70.0000.04316.14
5.3.60.0100.05016.14
5.3.50.0070.04016.14
5.3.40.0000.05016.14
5.3.30.0100.04316.14
5.3.20.0000.04016.14
5.3.10.0070.05316.14
5.3.00.0070.07316.14
5.2.170.0070.03016.14
5.2.160.0000.06716.14
5.2.150.0070.05016.14
5.2.140.0030.06316.14
5.2.130.0070.05716.14
5.2.120.0070.06016.14
5.2.110.0070.04716.14
5.2.100.0070.05316.14
5.2.90.0070.03716.14
5.2.80.0070.06016.14
5.2.70.0070.05016.14
5.2.60.0070.03016.14
5.2.50.0070.06016.14
5.2.40.0130.04716.14
5.2.30.0130.03316.14
5.2.20.0170.05016.14
5.2.10.0030.06016.14
5.2.00.0070.04016.14
5.1.60.0000.04316.14
5.1.50.0000.06016.14
5.1.40.0100.04716.14
5.1.30.0100.04016.14
5.1.20.0000.06016.14
5.1.10.0100.05316.14
5.1.00.0000.05316.14
5.0.50.0000.02716.14
5.0.40.0030.03316.14
5.0.30.0000.06716.14
5.0.20.0000.04016.14
5.0.10.0000.02716.14
5.0.00.0030.06016.14
4.4.90.0030.03316.14
4.4.80.0030.03016.14
4.4.70.0030.03716.14
4.4.60.0030.03316.14
4.4.50.0070.02316.14
4.4.40.0030.05016.14
4.4.30.0030.03316.14
4.4.20.0030.03316.14
4.4.10.0030.02316.14
4.4.00.0000.02716.14
4.3.110.0000.02016.14
4.3.100.0000.01716.14
4.3.90.0000.02316.14
4.3.80.0000.05716.14
4.3.70.0000.02016.14
4.3.60.0030.01716.14
4.3.50.0000.03716.14
4.3.40.0030.03016.14
4.3.30.0000.02016.14
4.3.20.0000.03716.14
4.3.10.0000.03716.14
4.3.00.0000.03016.14

preferences:
55.53 ms | 401 KiB | 5 Q