3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* $str = 'test1234'; preg_match_all('!\d+!', $str, $matches);*/ /*for ($matches = 0; $matches <9; $matches++) { $letters = range('a','j'); var_dump($letters[$matches]); }*/ $string = 'test1234'; $string = preg_replace("/[^0-9]/","a-j",$string); var_dump($string);

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.00918.45
8.3.50.0160.00316.38
8.3.40.0110.00418.97
8.3.30.0150.00318.66
8.3.20.0000.00720.13
8.3.10.0050.00323.65
8.3.00.0080.00019.50
8.2.180.0100.01018.29
8.2.170.0040.01122.96
8.2.160.0100.01020.16
8.2.150.0060.00325.66
8.2.140.0050.00324.66
8.2.130.0080.00022.21
8.2.120.0040.00426.35
8.2.110.0000.00921.18
8.2.100.0090.00318.03
8.2.90.0060.00319.07
8.2.80.0000.00917.97
8.2.70.0000.00917.93
8.2.60.0000.01117.80
8.2.50.0080.00018.10
8.2.40.0070.00020.57
8.2.30.0040.00419.13
8.2.20.0000.00817.99
8.2.10.0050.00318.07
8.2.00.0000.00818.14
8.1.280.0110.00425.92
8.1.270.0080.00020.24
8.1.260.0090.00626.35
8.1.250.0080.00028.09
8.1.240.0070.00420.66
8.1.230.0090.00317.77
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0000.00917.48
8.1.190.0090.00017.35
8.1.180.0080.00018.10
8.1.170.0050.00318.72
8.1.160.0040.00418.88
8.1.150.0000.00718.85
8.1.140.0000.00717.71
8.1.130.0070.00018.80
8.1.120.0070.00017.61
8.1.110.0040.00417.47
8.1.100.0030.00517.43
8.1.90.0040.00417.55
8.1.80.0000.00717.53
8.1.70.0040.00417.55
8.1.60.0030.00617.68
8.1.50.0000.00717.50
8.1.40.0080.00017.52
8.1.30.0040.00417.64
8.1.20.0070.00017.64
8.1.10.0030.00717.49
8.1.00.0040.00417.42
8.0.300.0040.00418.77
8.0.290.0080.00016.63
8.0.280.0070.00018.40
8.0.270.0000.00717.13
8.0.260.0000.00716.81
8.0.250.0070.00017.05
8.0.240.0030.00316.97
8.0.230.0000.00717.09
8.0.220.0040.00417.03
8.0.210.0000.00816.87
8.0.200.0080.00017.05
8.0.190.0000.00716.93
8.0.180.0050.00217.03
8.0.170.0030.00617.01
8.0.160.0000.00717.03
8.0.150.0080.00416.83
8.0.140.0040.00416.84
8.0.130.0000.00613.46
8.0.120.0040.00416.83
8.0.110.0080.00017.04
8.0.100.0070.00016.99
8.0.90.0000.00716.78
8.0.80.0100.01316.99
8.0.70.0040.00416.97
8.0.60.0040.00416.89
8.0.50.0080.00016.79
8.0.30.0100.01117.07
8.0.20.0130.00717.41
8.0.10.0040.00417.13
8.0.00.0110.00616.71
7.4.330.0050.00015.55
7.4.320.0030.00316.74
7.4.300.0030.00416.56
7.4.290.0040.00416.75
7.4.280.0030.00816.61
7.4.270.0030.00316.73
7.4.260.0000.00716.67
7.4.250.0050.00216.74
7.4.240.0030.00516.66
7.4.230.0030.00516.82
7.4.220.0060.00316.64
7.4.210.0070.00716.68
7.4.200.0030.00316.50
7.4.160.0100.00916.57
7.4.150.0160.00317.40
7.4.140.0100.01017.86
7.4.130.0090.00916.77
7.4.120.0100.01116.58
7.4.110.0080.01016.71
7.4.100.0090.00916.67
7.4.90.0060.01516.75
7.4.80.0090.01019.39
7.4.70.0140.00916.84
7.4.60.0100.00916.54
7.4.50.0040.01116.63
7.4.40.0060.01416.54
7.4.00.0090.00714.96
7.3.330.0050.00013.00
7.3.320.0060.00013.07
7.3.310.0000.00716.12
7.3.300.0070.00016.18
7.3.290.0050.01116.27
7.3.280.0090.00616.23
7.3.270.0100.02017.40
7.3.260.0150.00516.57
7.3.250.0100.01016.52
7.3.240.0090.00816.46
7.3.230.0060.01216.38
7.3.210.0070.01016.72
7.3.200.0130.00316.39
7.3.190.0070.01416.34
7.3.180.0110.00916.43
7.3.170.0130.00316.46
7.3.160.0090.01316.34
7.3.120.0070.01414.70
7.3.110.0150.00614.97
7.3.100.0070.01314.87
7.3.90.0070.01014.74
7.3.80.0070.00314.77
7.3.70.0040.00714.84
7.3.60.0070.00714.65
7.3.50.0060.00614.80
7.3.40.0030.01014.87
7.3.30.0060.00614.77
7.3.20.0060.00916.69
7.3.10.0060.00716.42
7.3.00.0060.00616.53
7.2.330.0070.01016.45
7.2.320.0060.01616.67
7.2.310.0090.01516.65
7.2.300.0100.00616.67
7.2.290.0050.01116.80
7.2.250.0070.01415.02
7.2.240.0100.01015.08
7.2.230.0000.01514.96
7.2.220.0040.01115.00
7.2.210.0040.00715.18
7.2.200.0070.01015.23
7.2.190.0090.00615.12
7.2.180.0040.01214.91
7.2.170.0040.01114.77
7.2.160.0040.01114.87
7.2.150.0110.00416.98
7.2.140.0040.01116.91
7.2.130.0050.00716.73
7.2.120.0030.01016.75
7.2.110.0070.00616.76
7.2.100.0040.00816.82
7.2.90.0040.00916.69
7.2.80.0030.01016.72
7.2.70.0100.00316.92
7.2.60.0060.00716.84
7.2.50.0050.00816.69
7.2.40.0070.01016.83
7.2.30.0090.00716.76
7.2.20.0100.00616.78
7.2.10.0120.01017.14
7.2.00.0100.01017.23
7.1.330.0100.00715.92
7.1.320.0070.00715.75
7.1.310.0000.01215.93
7.1.300.0030.00716.07
7.1.290.0000.00815.86
7.1.280.0070.00715.71
7.1.270.0080.00315.98
7.1.260.0080.00415.68
7.1.250.0070.00715.89
7.1.240.0070.00715.87
7.1.230.0040.00415.89
7.1.220.0060.00915.99
7.1.210.0080.00315.91
7.1.200.0050.00716.02
7.1.190.0070.00715.93
7.1.180.0000.01115.86
7.1.170.0110.00715.88
7.1.160.0070.00615.70
7.1.150.0050.00515.94
7.1.140.0070.00716.02
7.1.130.0170.00616.62
7.1.120.0370.01016.33
7.1.110.0200.00416.01
7.1.100.0160.00716.17
7.1.90.0140.00616.25
7.1.80.0140.00916.15
7.1.70.0160.00515.66
7.1.60.0160.01024.55
7.1.50.0220.00924.33
7.1.40.0170.01424.18
7.1.30.0160.01124.29
7.1.20.0170.01124.38
7.1.10.0130.00815.39
7.1.00.0120.00915.46
7.0.330.0040.01115.54
7.0.320.0030.01015.67
7.0.310.0030.01015.41
7.0.300.0040.01115.42
7.0.290.0040.01115.66
7.0.280.0100.00715.16
7.0.270.0080.00315.47
7.0.260.0150.00015.41
7.0.250.0120.00015.72
7.0.240.0100.00315.51
7.0.230.0140.00015.41
7.0.220.0030.01015.17
7.0.210.0100.00315.67
7.0.200.0060.01015.78
7.0.190.0000.01415.48
7.0.180.0030.00715.26
7.0.170.0070.00715.41
7.0.160.0030.01015.48
7.0.150.0040.00815.16
7.0.140.0040.00715.32
7.0.130.0040.01115.75
7.0.120.0070.00315.55
7.0.110.0070.00315.63
7.0.100.0100.00315.35
7.0.90.0000.01115.73
7.0.80.0030.00515.74
7.0.70.0090.00015.37
7.0.60.0050.00315.59
7.0.50.0060.00515.47
7.0.40.0030.00613.75
7.0.30.0000.00813.74
7.0.20.0000.01313.68
7.0.10.0130.00013.59
7.0.00.0000.01013.59
5.6.400.0030.00714.37
5.6.390.0060.00314.13
5.6.380.0060.00614.43
5.6.370.0060.00614.25
5.6.360.0120.00614.42
5.6.350.0030.01014.62
5.6.340.0080.00414.07
5.6.330.0070.00714.36
5.6.320.0140.00314.11
5.6.310.0060.00613.97
5.6.300.0070.00714.16
5.6.290.0040.00814.42
5.6.280.0040.00713.97
5.6.270.0030.00714.32
5.6.260.0060.00614.19
5.6.250.0040.00714.20
5.6.240.0060.00813.89
5.6.230.0090.00614.59
5.6.220.0060.00914.18
5.6.210.0070.00714.51
5.6.200.0030.01214.15
5.6.190.0060.00614.05
5.6.180.0050.00514.14
5.6.170.0060.00314.13
5.6.160.0040.01114.07
5.6.150.0000.01014.16
5.6.140.0000.01214.50
5.6.130.0000.01414.38
5.6.120.0070.00714.32
5.6.110.0040.00714.39
5.6.100.0000.01514.27
5.6.90.0030.01014.32
5.6.80.0030.01013.96
5.6.70.0000.01514.17
5.6.60.0040.01214.47
5.6.50.0060.00614.13
5.6.40.0060.00614.20
5.6.30.0000.01314.07
5.6.20.0100.00614.13
5.6.10.0090.00614.31
5.6.00.0080.00814.17

preferences:
48.05 ms | 401 KiB | 5 Q