3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "In My Cart : 11 items", "12 Monkeys", "11 won 1 too", "At the end 7", ]; foreach ($strings as $string) { var_dump(sscanf(' ' . $string, '%*[^0-9]%d')[0]); }

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.0090.00616.38
8.3.50.0000.01420.00
8.3.40.0120.00318.75
8.3.30.0110.00419.27
8.3.20.0000.00824.18
8.3.10.0070.00024.66
8.3.00.0030.00526.16
8.2.180.0100.00725.92
8.2.170.0180.00019.04
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0080.00026.16
8.2.110.0070.00420.88
8.2.100.0110.00017.85
8.2.90.0040.00418.28
8.2.80.0040.00419.12
8.2.70.0050.00317.93
8.2.60.0020.00518.22
8.2.50.0030.00518.10
8.2.40.0050.00319.89
8.2.30.0020.00518.09
8.2.20.0000.00720.42
8.2.10.0160.00217.79
8.2.00.0090.00518.44
8.1.280.0120.00625.92
8.1.270.0060.00323.99
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0090.00023.80
8.1.230.0040.00822.83
8.1.220.0040.00417.76
8.1.210.0030.00518.77
8.1.200.0140.00417.13
8.1.190.0040.00417.00
8.1.180.0030.00518.10
8.1.170.0040.00418.78
8.1.160.0000.00718.85
8.1.150.0060.00318.55
8.1.140.0080.00317.41
8.1.130.0070.00518.14
8.1.120.0070.00717.39
8.1.110.0030.00917.42
8.1.100.0090.00417.46
8.1.90.0090.00317.46
8.1.80.0080.00517.39
8.1.70.0040.00717.41
8.1.60.0100.00317.57
8.1.50.0130.00417.53
8.1.40.0120.00517.46
8.1.30.0090.00617.54
8.1.20.0100.00717.62
8.1.10.0120.00917.54
8.1.00.0210.00217.41
8.0.300.0040.00420.26
8.0.290.0080.00016.75
8.0.280.0030.00318.34
8.0.270.0140.00216.86
8.0.260.0090.00317.62
8.0.250.0090.00316.92
8.0.240.0060.00516.90
8.0.230.0090.00216.84
8.0.220.0050.00716.88
8.0.210.0090.00216.79
8.0.200.0060.00616.93
8.0.190.0080.00416.82
8.0.180.0090.00916.90
8.0.170.0150.00216.87
8.0.160.0090.00916.83
8.0.150.0140.00316.73
8.0.140.0170.00016.78
8.0.130.0140.00416.82
8.0.120.0100.00516.73
8.0.110.0100.00316.74
8.0.100.0120.00316.77
8.0.90.0120.00216.85
8.0.80.0080.00616.75
8.0.70.0080.00616.79
8.0.60.0100.00716.78
8.0.50.0220.00516.79
8.0.30.0150.00616.77
8.0.20.0160.00216.78
8.0.10.0120.00816.95
7.4.330.0070.00315.76
7.4.320.0090.00216.42
7.4.300.0050.00616.46
7.4.290.0190.00016.49
7.4.280.0190.00216.44
7.4.270.0130.00216.59
7.4.260.0140.00216.47
7.4.250.0130.00516.49
7.4.240.0120.00616.54
7.4.230.0100.00416.42
7.4.220.0110.00316.49
7.4.210.0130.00316.48
7.4.200.0130.00416.50
7.4.190.0120.00616.59
7.4.180.0150.00216.49
7.4.160.0140.00116.59
7.4.150.0100.00516.46
7.4.140.0080.00716.43
7.4.130.0140.00016.46
7.4.120.0090.00516.38
7.4.110.0130.00116.25
7.4.100.0130.00416.52
7.4.90.0140.00316.42
7.4.80.0140.00316.41
7.4.70.0140.00316.41
7.4.60.0090.00916.36
7.4.50.0130.00316.28
7.4.40.0080.00616.26
7.4.30.0080.00616.45
7.4.20.0070.00516.35
7.4.10.0090.00316.15
7.4.00.0060.00616.33

preferences:
57.68 ms | 400 KiB | 5 Q