3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Hello! 123 test this? 456. done? 100%"; $int = intval(preg_replace('/[^0-9]+/', '', $string), 10); echo $int; $str = 'In My Cart : 11 12 items'; preg_match_all('!\d+!', $str, $matches); print_r($matches); print_r(array_sum($matches));

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.40.0120.00318.86
8.3.30.0120.00318.85
8.3.20.0000.00720.21
8.3.10.0040.00421.82
8.3.00.0040.00419.51
8.2.170.0070.00722.96
8.2.160.0100.00320.38
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0060.00320.97
8.2.120.0140.00426.35
8.2.110.0080.00421.04
8.2.100.0080.00417.91
8.2.90.0000.00819.28
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0000.00720.59
8.2.30.0040.00421.11
8.2.20.0000.00718.01
8.2.10.0080.00018.04
8.2.00.0030.00618.13
8.1.270.0050.00322.18
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00420.94
8.1.230.0080.00419.15
8.1.220.0000.00817.78
8.1.210.0040.00418.77
8.1.200.0000.00917.35
8.1.190.0080.00017.38
8.1.180.0070.00018.10
8.1.170.0090.00018.97
8.1.160.0080.00019.03
8.1.150.0040.00420.63
8.1.140.0090.00019.51
8.1.130.0000.00718.74
8.1.120.0040.00417.45
8.1.110.0050.00217.50
8.1.100.0050.00317.49
8.1.90.0000.00717.42
8.1.80.0000.00817.57
8.1.70.0080.00017.60
8.1.60.0080.00017.69
8.1.50.0030.00517.56
8.1.40.0060.00317.45
8.1.30.0040.00417.56
8.1.20.0000.00717.72
8.1.10.0040.00417.52
8.1.00.0000.00717.55
8.0.300.0030.00520.08
8.0.290.0040.00416.75
8.0.280.0000.00818.35
8.0.270.0000.00717.18
8.0.260.0030.00318.37
8.0.250.0000.00817.13
8.0.240.0000.00716.98
8.0.230.0040.00417.06
8.0.220.0070.00016.98
8.0.210.0000.00917.00
8.0.200.0040.00416.98
8.0.190.0030.00516.93
8.0.180.0030.00516.98
8.0.170.0000.00716.86
8.0.160.0050.00216.88
8.0.150.0050.00316.79
8.0.140.0000.00716.93
8.0.130.0050.00013.39
8.0.120.0000.00716.82
8.0.110.0040.00416.74
8.0.100.0050.00216.91
8.0.90.0000.00716.78
8.0.80.0040.01117.02
8.0.70.0040.00416.83
8.0.60.0040.00417.00
8.0.50.0040.00416.91
8.0.30.0110.00817.11
8.0.20.0100.00917.40
8.0.10.0080.00017.09
8.0.00.0120.01216.97
7.4.330.0030.00315.55
7.4.320.0030.00316.64
7.4.300.0070.00016.54
7.4.290.0000.00716.65
7.4.280.0040.00416.57
7.4.270.0040.00416.76
7.4.260.0050.00216.69
7.4.250.0090.00016.61
7.4.240.0000.00716.50
7.4.230.0040.00416.82
7.4.220.0110.00716.70
7.4.210.0030.01616.81
7.4.200.0030.00316.84
7.4.160.0070.01016.53
7.4.150.0150.00317.40
7.4.140.0090.00917.86
7.4.130.0150.00616.61
7.4.120.0100.01116.54
7.4.110.0120.00616.67
7.4.100.0120.00916.53
7.4.90.0090.00916.70
7.4.80.0090.00919.39
7.4.70.0110.00516.75
7.4.60.0100.01016.61
7.4.50.0070.01016.61
7.4.40.0090.01316.73
7.4.30.0110.00716.46
7.4.00.0060.01215.11
7.3.330.0070.00013.09
7.3.320.0050.00013.06
7.3.310.0030.00316.18
7.3.300.0000.00716.30
7.3.290.0090.00716.35
7.3.280.0090.00716.32
7.3.270.0090.00917.40
7.3.260.0200.01516.57
7.3.250.0070.01016.49
7.3.240.0100.01116.43
7.3.230.0110.00716.60
7.3.210.0080.00816.37
7.3.200.0080.00816.38
7.3.190.0160.00016.37
7.3.180.0090.00916.55
7.3.170.0150.00616.70
7.3.160.0130.00316.46
7.3.120.0040.01514.52
7.3.110.0030.01315.02
7.3.100.0070.00714.96
7.3.90.0030.00614.55
7.3.80.0110.00715.00
7.3.70.0000.01614.56
7.3.60.0030.00715.00
7.3.50.0030.01414.82
7.3.40.0070.01014.75
7.3.30.0070.00714.82
7.3.20.0000.01516.75
7.3.10.0060.00816.63
7.3.00.0060.00716.85
7.2.330.0140.00416.63
7.2.320.0230.00016.74
7.2.310.0030.01316.82
7.2.300.0060.01016.76
7.2.290.0030.01416.73
7.2.250.0060.01314.94
7.2.240.0120.00915.18
7.2.230.0030.01715.04
7.2.220.0070.01014.87
7.2.210.0080.00715.21
7.2.200.0030.00914.89
7.2.190.0030.01015.12
7.2.180.0030.01415.04
7.2.170.0000.01215.18
7.2.130.0060.00716.98
7.2.120.0060.00817.00
7.2.110.0050.00817.02
7.2.100.0130.00417.11
7.2.90.0050.00817.14
7.2.80.0080.00616.97
7.2.70.0060.01016.94
7.2.60.0090.00816.91
7.2.50.0090.00516.90
7.2.40.0060.01116.97
7.2.30.0100.00516.99
7.2.20.0050.00917.08
7.2.10.0060.00617.06
7.2.00.0040.01017.88
7.1.330.0080.00816.22
7.1.320.0060.01215.97
7.1.310.0060.00916.13
7.1.300.0070.00715.69
7.1.290.0000.01415.89
7.1.280.0080.00615.96
7.1.270.0030.00816.11
7.1.260.0140.00015.69
7.1.250.0040.00915.88
7.1.200.0090.00315.75
7.1.100.0030.01018.37
7.1.70.0200.01315.41
7.1.60.0540.01433.62
7.1.50.0330.01232.89
7.1.40.0350.01032.84
7.1.30.0420.00932.91
7.1.20.0360.01332.91
7.1.10.0260.01315.05
7.1.00.0240.00915.16
7.0.200.0380.01015.11
7.0.190.0240.01015.14
7.0.180.0200.01014.67
7.0.170.0230.01314.59
7.0.160.0260.01314.52
7.0.150.0240.01014.55
7.0.140.0370.00014.81
7.0.130.0230.01215.00
7.0.120.0180.01514.82
7.0.110.0230.01314.63
7.0.100.0170.01014.59
7.0.90.0170.01414.67
7.0.80.0420.01014.64
7.0.70.0180.01514.59
7.0.60.0340.01014.49
7.0.50.0330.01214.90
7.0.40.0330.01014.78
7.0.30.0280.00414.93
7.0.20.0330.01114.58
7.0.10.0340.01614.70
7.0.00.0310.01214.75

preferences:
50.86 ms | 400 KiB | 5 Q