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[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.40.0060.00919.00
8.3.30.0090.00618.83
8.3.20.0040.00420.29
8.3.10.0040.00421.75
8.3.00.0080.00019.22
8.2.170.0070.00722.96
8.2.160.0110.00420.58
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00021.24
8.2.120.0090.00926.35
8.2.110.0060.00322.11
8.2.100.0110.00017.97
8.2.90.0040.00419.34
8.2.80.0050.00317.97
8.2.70.0040.00417.88
8.2.60.0030.00518.03
8.2.50.0040.00418.10
8.2.40.0000.00820.55
8.2.30.0050.00321.16
8.2.20.0070.00018.14
8.2.10.0000.00818.13
8.2.00.0050.00218.07
8.1.270.0000.00722.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00423.79
8.1.230.0120.00021.03
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0050.00317.23
8.1.180.0030.00618.10
8.1.170.0000.00719.01
8.1.160.0000.00719.06
8.1.150.0050.00320.69
8.1.140.0070.00319.56
8.1.130.0000.00718.84
8.1.120.0030.00517.59
8.1.110.0000.00817.58
8.1.100.0030.00517.54
8.1.90.0040.00417.49
8.1.80.0040.00417.54
8.1.70.0000.00817.54
8.1.60.0060.00317.67
8.1.50.0000.00817.63
8.1.40.0040.00417.58
8.1.30.0000.00817.65
8.1.20.0080.00017.71
8.1.10.0030.00617.57
8.1.00.0040.00417.54
8.0.300.0000.00720.10
8.0.290.0040.00416.75
8.0.280.0050.00318.38
8.0.270.0000.00717.27
8.0.260.0000.00618.52
8.0.250.0000.00717.14
8.0.240.0000.00716.96
8.0.230.0000.00716.92
8.0.220.0070.00016.95
8.0.210.0000.00816.93
8.0.200.0030.00316.93
8.0.190.0040.00416.92
8.0.180.0000.00817.03
8.0.170.0000.00716.96
8.0.160.0000.00717.06
8.0.150.0030.00616.84
8.0.140.0050.00217.00
8.0.130.0030.00313.35
8.0.120.0060.00316.92
8.0.110.0030.00517.05
8.0.100.0000.00816.85
8.0.90.0000.00716.92
8.0.80.0110.00416.97
8.0.70.0070.00016.94
8.0.60.0000.00816.84
8.0.50.0080.00016.82
8.0.30.0080.01017.21
8.0.20.0090.01117.42
8.0.10.0050.00217.20
8.0.00.0040.01816.82
7.4.330.0060.00015.55
7.4.320.0000.00616.73
7.4.300.0030.00316.56
7.4.290.0000.00716.64
7.4.280.0040.00416.62
7.4.270.0030.00616.70
7.4.260.0070.00316.52
7.4.250.0030.00516.70
7.4.240.0080.00016.73
7.4.230.0040.00416.62
7.4.220.0110.00616.74
7.4.210.0000.01916.65
7.4.200.0030.00316.63
7.4.160.0090.00916.57
7.4.150.0070.01117.40
7.4.140.0120.00817.86
7.4.130.0130.00816.68
7.4.120.0130.00716.72
7.4.110.0100.00716.61
7.4.100.0180.00616.62
7.4.90.0110.01116.64
7.4.80.0090.00919.39
7.4.70.0050.01116.68
7.4.60.0110.00616.68
7.4.50.0000.01716.62
7.4.40.0110.00516.64
7.4.30.0090.00916.43
7.4.00.0030.01215.33
7.3.330.0050.00313.13
7.3.320.0000.00613.11
7.3.310.0030.00316.43
7.3.300.0000.00716.19
7.3.290.0090.00816.45
7.3.280.0050.01016.40
7.3.270.0150.00817.40
7.3.260.0220.01516.41
7.3.250.0080.01416.64
7.3.240.0090.01116.65
7.3.230.0040.01316.63
7.3.210.0150.00616.64
7.3.200.0110.00916.38
7.3.190.0070.01016.47
7.3.180.0000.01716.60
7.3.170.0110.01116.51
7.3.160.0100.00616.84
7.2.330.0070.01016.76
7.2.320.0000.01816.83
7.2.310.0040.01216.76
7.2.300.0130.00916.86
7.2.290.0030.01316.69
7.2.80.0030.01316.86
7.2.60.0040.01116.94
7.2.00.0040.00819.73
7.1.200.0030.00916.03
7.1.100.0030.00918.25
7.1.70.0360.00715.67
7.1.60.0420.01633.44
7.1.50.0290.02233.12
7.1.40.0420.01733.05
7.1.30.0440.01932.88
7.1.20.0480.01733.10
7.1.10.0200.01015.12
7.1.00.0230.01315.00
7.0.200.0320.00614.80
7.0.190.0300.01015.10
7.0.180.0210.01114.72
7.0.170.0280.01814.51
7.0.160.0320.01314.66
7.0.150.0210.01114.59
7.0.140.0220.01614.80
7.0.130.0220.01014.87
7.0.120.1990.01014.81
7.0.110.0330.01114.79
7.0.100.0230.01814.80
7.0.90.0200.00814.76
7.0.80.0210.00714.89
7.0.70.0240.01214.63
7.0.60.0190.01114.47
7.0.50.0180.01314.77
7.0.40.0230.00614.93
7.0.30.0260.00315.01
7.0.20.0210.01914.57
7.0.10.0280.00814.85
7.0.00.0250.01314.85

preferences:
65.26 ms | 400 KiB | 5 Q