3v4l.org

run code in 300+ PHP versions simultaneously
<?php $autocomplete = "BD/AL/ABC/01/18 job developper"; $q = "lol reference=BD/AL/ABC/ test"; $expr = '/reference=\w*/'; $words = explode(' ', $q); $newQ = ''; foreach ($words as $word) { if (preg_match($expr, $word, $matches)) { $reference = str_replace('reference=', '', $word); echo $reference; } else { $newQ = $newQ . ' ' . $word; } } echo $newQ;

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.0140.00716.75
8.3.50.0120.00316.34
8.3.40.0160.00018.89
8.3.30.0120.00318.80
8.3.20.0040.00421.70
8.3.10.0040.00423.68
8.3.00.0000.00819.68
8.2.180.0100.01025.92
8.2.170.0030.01222.96
8.2.160.0130.00022.00
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00019.18
8.2.120.0040.00426.35
8.2.110.0040.00820.85
8.2.100.0040.00817.84
8.2.90.0000.00919.95
8.2.80.0030.00517.97
8.2.70.0060.00317.75
8.2.60.0080.00018.05
8.2.50.0000.00818.07
8.2.40.0070.00517.84
8.2.30.0000.00717.98
8.2.20.0000.00718.07
8.2.10.0000.00817.93
8.2.00.0030.00619.84
8.1.280.0060.01125.92
8.1.270.0080.00023.70
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00324.02
8.1.230.0090.00321.03
8.1.220.0050.00317.79
8.1.210.0050.00319.01
8.1.200.0000.01017.37
8.1.190.0000.00817.38
8.1.180.0040.00418.10
8.1.170.0090.00018.84
8.1.160.0000.00918.82
8.1.150.0040.00419.07
8.1.140.0040.00417.57
8.1.130.0000.00719.05
8.1.120.0000.00717.61
8.1.110.0040.00417.52
8.1.100.0000.00717.52
8.1.90.0040.00417.62
8.1.80.0040.00417.62
8.1.70.0000.00717.58
8.1.60.0030.00517.57
8.1.50.0050.00317.61
8.1.40.0000.00817.72
8.1.30.0000.00817.81
8.1.20.0040.00417.69
8.1.10.0050.00317.62
8.1.00.0040.00417.52
8.0.300.0000.00719.98
8.0.290.0040.00416.75
8.0.280.0000.00820.25
8.0.270.0000.00817.28
8.0.260.0030.00316.96
8.0.250.0030.00317.16
8.0.240.0030.00617.05
8.0.230.0070.00017.08
8.0.220.0000.00717.01
8.0.210.0030.00317.07
8.0.200.0070.00017.08
8.0.190.0000.00816.98
8.0.180.0040.00417.03
8.0.170.0030.00617.06
8.0.160.0000.00817.03
8.0.150.0000.00716.87
8.0.140.0030.00317.02
8.0.130.0060.00013.39
8.0.120.0000.00817.03
8.0.110.0030.00517.05
8.0.100.0000.00716.96
8.0.90.0000.00717.07
8.0.80.0120.00916.96
8.0.70.0040.00417.04
8.0.60.0000.00717.05
8.0.50.0040.00417.00
8.0.30.0090.01017.21
8.0.20.0130.00717.40
8.0.10.0040.00417.04
8.0.00.0130.00716.96
7.4.330.0000.00515.55
7.4.320.0000.00616.80
7.4.300.0040.00416.71
7.4.290.0080.00016.68
7.4.280.0000.00716.70
7.4.270.0050.00216.78
7.4.260.0000.00716.68
7.4.250.0000.00716.77
7.4.240.0070.00016.72
7.4.230.0000.00716.91
7.4.220.0000.00816.61
7.4.210.0060.01016.78
7.4.200.0030.00316.89
7.4.160.0120.00716.70
7.4.140.0100.00917.86
7.4.130.0150.00616.71
7.4.120.0120.00816.59
7.4.110.0110.00616.60
7.4.100.0060.01216.95
7.4.90.0090.00916.62
7.4.80.0090.01019.39
7.4.70.0160.00316.68
7.4.60.0080.00816.63
7.4.50.0100.01016.53
7.4.40.0090.00916.50
7.4.00.0060.01115.13
7.3.330.0000.00513.15
7.3.320.0000.00513.25
7.3.310.0070.00016.28
7.3.300.0070.00016.27
7.3.290.0070.00016.45
7.3.280.0120.00416.40
7.3.260.0120.00716.39
7.3.240.0100.00616.70
7.3.230.0030.01416.45
7.3.210.0110.00616.50
7.3.200.0060.01016.40
7.3.190.0030.01316.29
7.3.180.0150.00916.53
7.3.170.0000.01716.58
7.3.160.0070.01016.45
7.3.120.0070.01314.94
7.3.110.0030.01514.86
7.3.100.0060.00314.78
7.3.90.0070.01015.21
7.3.80.0060.00614.57
7.3.70.0030.01014.95
7.3.60.0030.01314.99
7.3.50.0060.00914.97
7.3.40.0070.00714.91
7.3.30.0040.00814.90
7.3.20.0100.00316.73
7.3.10.0040.01116.93
7.3.00.0070.00716.80
7.2.330.0170.00016.80
7.2.320.0130.00316.88
7.2.310.0150.00316.78
7.2.300.0030.01316.82
7.2.290.0160.00316.77
7.2.250.0060.01315.14
7.2.240.0030.01715.41
7.2.230.0100.00715.36
7.2.220.0070.00715.22
7.2.210.0040.01115.01
7.2.200.0100.00015.25
7.2.190.0060.01015.25
7.2.180.0090.00615.22
7.2.170.0070.01015.27
7.2.60.0000.01017.21
7.2.30.0130.00917.99
7.2.20.0100.01018.14
7.2.10.0110.00918.23
7.2.00.0120.00918.35
7.1.330.0040.01116.05
7.1.320.0090.00616.25
7.1.310.0140.00316.22
7.1.300.0000.01315.73
7.1.290.0040.00916.14
7.1.280.0060.00615.91
7.1.270.0000.01115.95
7.1.260.0040.01115.99
7.1.200.0030.01016.04
7.1.150.0110.00817.21
7.1.140.0100.01717.14
7.1.130.0330.01017.04
7.1.120.0060.01217.17
7.1.110.0860.01416.49
7.1.100.0140.00816.45
7.1.90.0110.01016.38
7.1.80.0120.01116.42
7.1.70.0110.01115.44
7.1.60.0290.01733.09
7.1.50.0410.01232.91
7.1.40.0340.01332.50
7.1.30.0340.01232.68
7.1.20.0310.01832.65
7.1.10.0120.01214.85
7.1.00.0080.01315.00

preferences:
59.89 ms | 401 KiB | 5 Q