3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = " Posting for friend Cupicake i*b mhr 57.5 inb ohr 37.4 inb wand 582,582,569 inb sing 163.9 inb mha 192 inb oha 192 "; $string = strtolower($string); $bs = substr_count($string, 'b'); $ses = substr_count($string, 's'); $slashes = substr_count($string, '/'); var_dump($slashes);

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.0120.00616.38
8.3.50.0220.00522.93
8.3.40.0150.00018.61
8.3.30.0150.00418.89
8.3.20.0080.00020.25
8.3.10.0080.00023.48
8.3.00.0030.00719.38
8.2.180.0040.01116.38
8.2.170.0110.00422.96
8.2.160.0140.00020.52
8.2.150.0050.00224.18
8.2.140.0040.00424.66
8.2.130.0100.00326.16
8.2.120.0040.00420.89
8.2.110.0090.00022.30
8.2.100.0060.00817.48
8.2.90.0030.00619.22
8.2.80.0080.00017.97
8.2.70.0050.00317.46
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0000.00818.16
8.2.30.0000.00718.02
8.2.20.0040.00417.73
8.2.10.0000.00718.00
8.2.00.0000.00717.56
8.1.280.0110.00425.92
8.1.270.0040.00422.05
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00423.97
8.1.230.0140.00019.01
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0000.00817.23
8.1.190.0040.00417.23
8.1.180.0060.00318.10
8.1.170.0040.00418.47
8.1.160.0000.00722.02
8.1.150.0070.00018.82
8.1.140.0040.00417.39
8.1.130.0040.00417.83
8.1.120.0030.00317.43
8.1.110.0060.00317.36
8.1.100.0030.00317.40
8.1.90.0030.00517.43
8.1.80.0080.00017.46
8.1.70.0070.00017.27
8.1.60.0060.00317.36
8.1.50.0050.00317.50
8.1.40.0040.00417.47
8.1.30.0030.00517.53
8.1.20.0050.00517.55
8.1.10.0050.00217.39
8.1.00.0000.00717.38
8.0.300.0050.00318.77
8.0.290.0040.00416.62
8.0.280.0000.00818.42
8.0.270.0030.00317.11
8.0.260.0000.00618.43
8.0.250.0000.00716.95
8.0.240.0000.00716.96
8.0.230.0000.00716.89
8.0.220.0040.00416.85
8.0.210.0070.00016.74
8.0.200.0030.00316.88
8.0.190.0040.00416.80
8.0.180.0070.00016.77
8.0.170.0050.00216.86
8.0.160.0070.00016.90
8.0.150.0000.00716.64
8.0.140.0040.00416.84
8.0.130.0030.00313.20
8.0.120.0000.00816.65
8.0.110.0000.00716.67
8.0.100.0040.00416.74
8.0.90.0000.00716.65
8.0.80.0060.01116.80
8.0.70.0000.00816.69
8.0.60.0000.00716.82
8.0.50.0000.00716.75
8.0.30.0120.01116.92
8.0.20.0110.00817.40
8.0.10.0040.00416.74
8.0.00.0070.01116.63
7.4.330.0000.00715.00
7.4.320.0030.00316.50
7.4.300.0060.00016.53
7.4.290.0000.00716.44
7.4.280.0000.00816.48
7.4.270.0000.00716.50
7.4.260.0070.00016.42
7.4.250.0000.00716.35
7.4.240.0040.00416.50
7.4.230.0000.00716.38
7.4.220.0030.01616.46
7.4.210.0030.01216.44
7.4.200.0070.00016.26
7.4.160.0030.01316.29
7.4.150.0100.00717.40
7.4.140.0120.00617.86
7.4.130.0040.01516.39
7.4.120.0110.00816.54
7.4.110.0060.01516.53
7.4.100.0070.01016.41
7.4.90.0070.01016.46
7.4.80.0100.01019.39
7.4.70.0070.01016.58
7.4.60.0100.00616.56
7.4.50.0050.00016.52
7.4.40.0100.00716.47
7.4.30.0070.01016.38
7.4.00.0040.01115.09
7.3.330.0030.00313.04
7.3.320.0000.00513.04
7.3.310.0030.00316.12
7.3.300.0030.00316.12
7.3.290.0100.00316.09
7.3.280.0050.01016.12
7.3.270.0060.01217.40
7.3.260.0090.00916.32
7.3.240.0100.00716.14
7.3.230.0070.01016.39
7.3.210.0180.00016.03
7.3.200.0060.01019.39
7.3.190.0170.00016.31
7.3.180.0140.00416.12
7.3.170.0080.00816.27
7.3.160.0080.00816.00
7.2.330.0030.02116.35
7.2.320.0130.00716.49
7.2.310.0120.00616.50
7.2.300.0060.00916.64
7.2.290.0140.00416.51
7.1.70.0030.01017.07
7.1.60.0140.01119.40
7.1.50.0070.01316.57
7.1.00.0030.07722.51
7.0.200.0000.00816.67
7.0.140.0070.06322.08
7.0.60.0030.04020.03
7.0.50.0200.06717.89
7.0.40.0070.08320.10
7.0.30.0230.08020.21
7.0.20.0230.07720.00
7.0.10.0070.05320.09
7.0.00.0100.08320.28
5.6.280.0000.07321.12
5.6.210.0170.07320.68
5.6.200.0200.03718.17
5.6.190.0070.04320.61
5.6.180.0270.03720.63
5.6.170.0200.03720.38
5.6.160.0100.08320.54
5.6.150.0100.04718.12
5.6.140.0070.08318.18
5.6.130.0070.08018.12
5.6.120.0030.04020.98
5.6.110.0000.04320.98
5.6.100.0100.08721.08
5.6.90.0030.04720.96
5.6.80.0070.08320.37
5.5.350.4270.04020.42
5.5.340.0000.06317.93
5.5.330.0070.04320.47
5.5.320.0430.07020.30
5.5.310.0200.06020.23
5.5.300.0030.05318.02
5.5.290.0000.04317.87
5.5.280.0170.06320.86
5.5.270.0070.06320.75
5.5.260.0030.08720.93
5.5.250.0000.05020.71
5.5.240.0130.03320.34
5.4.450.0730.03719.41
5.4.440.0430.04019.57
5.4.430.0900.04019.52
5.4.420.0370.03319.24
5.4.410.1100.04019.33
5.4.400.0730.03318.94
5.4.390.1230.03319.09
5.4.380.0370.05318.63
5.4.370.0270.05318.58
5.4.360.0400.04718.81
5.4.350.0330.05318.60
5.4.340.0500.06318.49
5.4.320.0050.04512.45
5.4.310.0070.03812.45
5.4.300.0070.04612.45
5.4.290.0050.04012.45
5.4.280.0060.04212.34
5.4.270.0070.03412.34
5.4.260.0050.05012.34
5.4.250.0080.03412.35
5.4.240.0100.03812.34
5.4.230.0100.04312.34
5.4.220.0090.03212.34
5.4.210.0080.03412.34
5.4.200.0070.04412.34
5.4.190.0030.04012.33
5.4.180.0050.04012.34
5.4.170.0050.03612.35
5.4.160.0040.03712.34
5.4.150.0050.04012.34
5.4.140.0040.03812.02
5.4.130.0080.03212.01
5.4.120.0060.04311.97
5.4.110.0070.03411.96
5.4.100.0080.03411.96
5.4.90.0030.03911.96
5.4.80.0050.04011.96
5.4.70.0080.03211.96
5.4.60.0050.03611.96
5.4.50.0040.03611.96
5.4.40.0060.03411.95
5.4.30.0050.04011.95
5.4.20.0040.03611.94
5.4.10.0040.03611.95
5.4.00.0050.03611.43
5.3.290.0090.04512.80
5.3.280.0090.04112.71
5.3.270.0050.04812.72
5.3.260.0050.04312.71
5.3.250.0080.03612.72
5.3.240.0070.03712.71
5.3.230.0070.03612.71
5.3.220.0080.03912.68
5.3.210.0080.03812.68
5.3.200.0070.03712.68
5.3.190.0100.03712.68
5.3.180.0140.03212.67
5.3.170.0030.03912.67
5.3.160.0060.03612.67
5.3.150.0080.03512.67
5.3.140.0050.03712.66
5.3.130.0070.03712.66
5.3.120.0050.03912.66
5.3.110.0070.03712.66
5.3.100.0050.04012.12
5.3.90.0050.03712.09
5.3.80.0050.04312.08
5.3.70.0060.03612.08
5.3.60.0080.03612.06
5.3.50.0070.03412.00
5.3.40.0050.03612.00
5.3.30.0050.03511.95
5.3.20.0040.04211.72
5.3.10.0090.03311.69
5.3.00.0030.03811.68
5.2.170.0020.0369.18
5.2.160.0000.0349.18
5.2.150.0010.0339.18
5.2.140.0070.0279.18
5.2.130.0050.0369.13
5.2.120.0080.0279.13
5.2.110.0050.0319.14
5.2.100.0050.0279.14
5.2.90.0050.0369.14
5.2.80.0050.0319.14
5.2.70.0050.0299.13
5.2.60.0050.0299.09
5.2.50.0060.0319.05
5.2.40.0060.0369.03
5.2.30.0060.0309.01
5.2.20.0020.0309.00
5.2.10.0030.0298.92
5.2.00.0030.0308.78
5.1.60.0070.0268.06
5.1.50.0050.0298.05
5.1.40.0040.0278.04
5.1.30.0050.0308.39
5.1.20.0060.0258.41
5.1.10.0050.0248.13
5.1.00.0070.0308.14
5.0.50.0050.0316.61
5.0.40.0030.0246.48
5.0.30.0030.0316.28
5.0.20.0040.0256.26
5.0.10.0030.0196.24
5.0.00.0030.0306.23
4.4.90.0010.0164.78
4.4.80.0020.0154.75
4.4.70.0040.0144.75
4.4.60.0020.0164.75
4.4.50.0040.0144.77
4.4.40.0030.0254.71
4.4.30.0020.0164.76
4.4.20.0040.0194.84
4.4.10.0020.0184.85
4.4.00.0010.0264.76
4.3.110.0010.0174.67
4.3.100.0040.0134.66
4.3.90.0010.0174.63
4.3.80.0030.0284.58
4.3.70.0000.0214.63
4.3.60.0020.0184.63
4.3.50.0020.0164.63
4.3.40.0040.0234.54
4.3.30.0020.0163.28
4.3.20.0020.0163.26
4.3.10.0040.0143.22
4.3.00.0170.01715.96

preferences:
45.84 ms | 401 KiB | 5 Q