3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = '9191919191'; $rest = substr($number, 0,4); $rest2 = substr($number, 4, 0); $f = $rest.'-'.$rest2; echo $f;

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.0140.01018.30
8.3.50.0100.00521.94
8.3.40.0100.01018.67
8.3.30.0110.00419.04
8.3.20.0040.00420.36
8.3.10.0040.00422.00
8.3.00.0040.00422.15
8.2.180.0180.00416.38
8.2.170.0090.00622.96
8.2.160.0080.00820.95
8.2.150.0040.00424.18
8.2.140.0070.01024.66
8.2.130.0050.00326.16
8.2.120.0030.00519.48
8.2.110.0040.00422.15
8.2.100.0090.00617.84
8.2.90.0040.00419.08
8.2.80.0060.00318.03
8.2.70.0000.00917.75
8.2.60.0090.00017.80
8.2.50.0030.00618.07
8.2.40.0060.00318.24
8.2.30.0050.00317.93
8.2.20.0000.00717.61
8.2.10.0000.00819.52
8.2.00.0090.00017.84
8.1.280.0100.01025.92
8.1.270.0090.00022.14
8.1.260.0070.00026.35
8.1.250.0030.00528.09
8.1.240.0080.00023.84
8.1.230.0110.00018.88
8.1.220.0030.00517.78
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0040.00417.52
8.1.180.0000.00718.10
8.1.170.0000.00818.44
8.1.160.0030.00621.93
8.1.150.0030.00518.68
8.1.140.0040.00417.50
8.1.130.0030.00317.91
8.1.120.0030.00617.36
8.1.110.0050.00317.41
8.1.100.0000.00717.49
8.1.90.0050.00317.46
8.1.80.0040.00417.46
8.1.70.0070.00017.35
8.1.60.0060.00317.65
8.1.50.0000.00717.42
8.1.40.0040.00417.53
8.1.30.0030.00617.56
8.1.20.0050.00317.62
8.1.10.0000.00817.47
8.1.00.0050.00317.46
8.0.300.0000.00718.77
8.0.290.0080.00017.18
8.0.280.0000.00718.35
8.0.270.0070.00017.25
8.0.260.0030.00316.82
8.0.250.0030.00316.94
8.0.240.0040.00416.83
8.0.230.0000.00716.96
8.0.220.0040.00416.92
8.0.210.0030.00316.85
8.0.200.0000.00616.96
8.0.190.0040.00416.83
8.0.180.0040.00416.93
8.0.170.0000.00716.89
8.0.160.0000.00716.83
8.0.150.0000.00716.88
8.0.140.0000.00716.84
8.0.130.0000.00513.35
8.0.120.0050.00316.84
8.0.110.0000.00716.73
8.0.100.0040.00416.75
8.0.90.0050.00316.74
8.0.80.0000.01616.92
8.0.70.0030.00316.77
8.0.60.0050.00216.75
8.0.50.0000.00717.00
8.0.30.0100.00817.20
8.0.20.0160.00317.40
8.0.10.0040.00416.99
8.0.00.0110.00816.76
7.4.330.0000.00515.15
7.4.320.0030.00316.63
7.4.300.0030.00516.57
7.4.290.0040.00416.51
7.4.280.0000.00716.50
7.4.270.0000.00616.65
7.4.260.0060.00316.48
7.4.250.0040.00416.57
7.4.240.0030.00416.53
7.4.230.0000.00716.49
7.4.220.0030.01616.39
7.4.210.0080.00816.54
7.4.200.0000.00716.61
7.4.190.0080.00016.71
7.4.160.0060.01016.61
7.4.150.0130.00317.40
7.4.140.0120.00517.86
7.4.130.0080.00916.57
7.4.120.0060.01316.40
7.4.110.0130.00316.42
7.4.100.0070.01016.41
7.4.90.0110.00616.37
7.4.80.0090.00619.39
7.4.70.0100.00716.57
7.4.60.0080.00816.18
7.4.50.0000.00816.45
7.4.40.0090.00322.77
7.4.30.0030.01316.51
7.4.00.0130.00314.93
7.3.330.0040.00413.14
7.3.320.0050.00013.09
7.3.310.0070.00016.02
7.3.300.0030.00316.10
7.3.290.0050.00816.20
7.3.280.0080.00816.25
7.3.270.0130.00317.40
7.3.260.0080.01116.41
7.3.250.0100.01016.20
7.3.240.0130.00316.38
7.3.230.0130.00316.41
7.3.210.0100.01416.42
7.3.200.0060.01119.39
7.3.190.0080.01116.16
7.3.180.0060.00916.33
7.3.170.0060.01516.55
7.3.160.0060.01416.09
7.3.120.0000.01014.68
7.3.10.0070.01016.13
7.3.00.0120.01216.22
7.2.330.0120.00816.72
7.2.320.0170.00016.55
7.2.310.0110.01116.75
7.2.300.0160.00616.59
7.2.290.0060.00916.51
7.2.130.0100.01016.50
7.2.120.0150.00816.33
7.2.110.0100.01316.32
7.2.100.0170.01016.40
7.2.90.0120.00916.42
7.2.80.0290.00416.87
7.2.70.0070.01116.14
7.2.60.0240.00616.42
7.2.50.0180.00316.38
7.2.40.0270.00317.02
7.2.30.0120.01516.55
7.2.20.0100.01416.16
7.2.10.0140.01016.57
7.2.00.0080.01218.13
7.1.250.0120.01115.21
7.1.100.0000.01118.15
7.1.70.0040.00417.14
7.1.60.0090.00919.82
7.1.50.0040.01116.70
7.1.00.0030.07722.35
7.0.200.0060.00616.38
7.0.140.0030.07321.95
7.0.60.0000.04319.89
7.0.50.0070.05317.90
7.0.40.0070.04320.06
7.0.30.0200.07320.09
7.0.20.0170.04720.04
7.0.10.0030.07320.09
7.0.00.0170.07320.00
5.6.280.0100.06721.03
5.6.210.0270.05720.50
5.6.200.0130.04318.22
5.6.190.0100.05020.57
5.6.180.0470.06720.57
5.6.170.0230.03720.50
5.6.160.0000.07720.48
5.6.150.0070.05318.17
5.6.140.0430.04318.18
5.6.130.0070.04018.14
5.6.120.0030.05020.89
5.6.110.0030.07320.88
5.6.100.0030.04721.00
5.6.90.0070.06021.09
5.6.80.0030.09020.39
5.5.350.0200.07020.45
5.5.340.0000.04317.92
5.5.330.0030.04320.07
5.5.320.0070.05020.17
5.5.310.0270.08320.41
5.5.300.0070.03717.89
5.5.290.0030.08318.02
5.5.280.0100.07320.76
5.5.270.0100.08020.88
5.5.260.0100.07320.83
5.5.250.0070.07320.69
5.5.240.0070.07320.14
5.4.450.0900.04319.51
5.4.440.0130.06019.63
5.4.430.0000.06319.35
5.4.420.0100.05319.68
5.4.410.0130.04718.80
5.4.400.0130.05018.52
5.4.390.0130.04718.68
5.4.380.0100.06018.58
5.4.370.0200.04318.64
5.4.360.0170.04318.49
5.4.350.0070.05718.70
5.4.340.0030.05718.62
5.4.320.0040.03912.45
5.4.310.0040.04012.45
5.4.300.0110.03412.46
5.4.290.0060.03812.45
5.4.280.0110.03612.34
5.4.270.0170.05018.72
5.4.260.0030.05318.66
5.4.250.0200.05318.51
5.4.240.0100.07018.66
5.4.230.0170.04318.70
5.4.220.0130.06018.66
5.4.210.0100.06318.61
5.4.200.0030.08318.84
5.4.190.0130.04718.50
5.4.180.0030.05718.84
5.4.170.0100.07318.75
5.4.160.0170.06718.83
5.4.150.0070.05718.85
5.4.140.0170.04016.46
5.4.130.0170.04316.24
5.4.120.0130.06016.39
5.4.110.0070.05016.07
5.4.100.0200.04016.16
5.4.90.0100.05016.24
5.4.80.0070.05316.05
5.4.70.0170.04716.30
5.4.60.0070.04716.15
5.4.50.0130.05016.24
5.4.40.0070.05316.19
5.4.30.0100.04716.14
5.4.20.0100.06316.14
5.4.10.0070.07016.18
5.4.00.0070.06715.87
5.3.290.0080.04512.80
5.3.280.0100.05314.75
5.3.270.0070.05314.60
5.3.260.0130.05014.37
5.3.250.0070.05014.60
5.3.240.0200.04014.37
5.3.230.0070.06714.60
5.3.220.0100.05714.43
5.3.210.0030.05714.58
5.3.200.0030.05014.41
5.3.190.0130.06714.48
5.3.180.0100.07014.57
5.3.170.0070.07314.58
5.3.160.0200.06014.56
5.3.150.0000.06714.44
5.3.140.0070.05314.42
5.3.130.0100.04714.43
5.3.120.0070.07014.56
5.3.110.0030.05314.69
5.3.100.0100.05713.80
5.3.90.0100.04314.01
5.3.80.0070.05013.96
5.3.70.0130.05013.79
5.3.60.0100.04714.02
5.3.50.0070.07013.71
5.3.40.0030.06013.81
5.3.30.0100.06313.82
5.3.20.0070.06313.57
5.3.10.0270.05013.66
5.3.00.0170.04713.65
5.2.170.0070.04011.17
5.2.160.0070.05711.15
5.2.150.0000.05011.07
5.2.140.0100.04311.14
5.2.130.0100.04710.86
5.2.120.0100.05711.09
5.2.110.0000.04710.95
5.2.100.0130.05311.20
5.2.90.0070.03710.86
5.2.80.0070.04010.99
5.2.70.0030.05711.00
5.2.60.0130.04711.07
5.2.50.0130.03710.93
5.2.40.0100.03311.10
5.2.30.0100.04310.89
5.2.20.0130.03010.95
5.2.10.0070.03710.93
5.2.00.0070.04010.66
5.1.60.0100.04310.22
5.1.50.0070.0339.76
5.1.40.0130.0379.94
5.1.30.0230.03710.25
5.1.20.0130.04010.36
5.1.10.0100.03310.11
5.1.00.0000.05310.10
5.0.50.0100.0278.48
5.0.40.0170.0278.43
5.0.30.0000.0578.28
5.0.20.0130.0278.28
5.0.10.0030.0378.37
5.0.00.0070.0408.16
4.4.90.0030.0208.16
4.4.80.0070.0238.16
4.4.70.0030.0208.16
4.4.60.0100.0138.16
4.4.50.0000.0238.16
4.4.40.0030.0478.16
4.4.30.0030.0208.16
4.4.20.0000.0338.16
4.4.10.0100.0178.16
4.4.00.0070.0378.16
4.3.110.0000.0238.16
4.3.100.0030.0238.16
4.3.90.0130.0178.16
4.3.80.0070.0308.16
4.3.70.0100.0238.16
4.3.60.0030.0238.16
4.3.50.0070.0178.16
4.3.40.0030.0338.16
4.3.30.0070.0278.16
4.3.20.0030.0238.16
4.3.10.0030.0208.16
4.3.00.0100.0306.95

preferences:
72.16 ms | 401 KiB | 5 Q