3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<EOD http://localhost:8000/search/fa?q=sth http://localhost:8000/search?q=sth http://localhost:8000/search http://localhost:8000/search/fa EOD; preg_match_all('/^(.*?)\/(\w{2,})(?:\?(.*?)|)$/mis',$str,$p); echo '<pre/>'; $final_array = array(); $i = 0; foreach($p[1] as $myP){ if(!($p[2][$i] == 'fa' || $p[2][$i] == 'en')){ $p[2][$i] = $p[2][$i].'/'.'en'; } $final_array[$i] = $myP.'/'.$p[2][$i]; $i++; } var_dump($final_array);

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.0110.01117.00
8.3.50.0140.00522.14
8.3.40.0070.00718.91
8.3.30.0120.00318.81
8.3.20.0030.00619.02
8.3.10.0050.00221.77
8.3.00.0040.00423.50
8.2.180.0040.01117.00
8.2.170.0060.01222.96
8.2.160.0100.00722.30
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00421.07
8.2.110.0030.00721.09
8.2.100.0060.00618.03
8.2.90.0090.00017.85
8.2.80.0060.00319.09
8.2.70.0060.00617.80
8.2.60.0000.00918.16
8.2.50.0040.00419.39
8.2.40.0030.00621.36
8.2.30.0070.00419.43
8.2.20.0000.00818.15
8.2.10.0030.00519.98
8.2.00.0070.00017.84
8.1.280.0120.00325.92
8.1.270.0040.00422.19
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.00923.88
8.1.230.0090.00317.76
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0000.00917.47
8.1.190.0040.00417.35
8.1.180.0000.00818.96
8.1.170.0050.00318.77
8.1.160.0080.00022.24
8.1.150.0050.00218.85
8.1.140.0040.00419.62
8.1.130.0000.00717.80
8.1.120.0000.00717.61
8.1.110.0000.00717.56
8.1.100.0040.00417.54
8.1.90.0050.00317.59
8.1.80.0000.00717.56
8.1.70.0040.00417.54
8.1.60.0040.00817.79
8.1.50.0050.00317.68
8.1.40.0000.01117.66
8.1.30.0040.00417.70
8.1.20.0060.00317.72
8.1.10.0000.00817.61
8.1.00.0000.00817.68
8.0.300.0050.00218.81
8.0.290.0030.00617.00
8.0.280.0030.00318.37
8.0.270.0040.00417.18
8.0.260.0030.00317.35
8.0.250.0050.00217.18
8.0.240.0030.00317.14
8.0.230.0030.00517.11
8.0.220.0040.00417.16
8.0.210.0000.00717.10
8.0.200.0040.00417.13
8.0.190.0000.00817.04
8.0.180.0030.00517.04
8.0.170.0080.00017.05
8.0.160.0040.00417.02
8.0.150.0050.00317.04
8.0.140.0040.00417.05
8.0.130.0000.00513.65
8.0.120.0030.00616.98
8.0.110.0000.00717.07
8.0.100.0050.00216.99
8.0.90.0050.00216.91
8.0.80.0080.01217.07
8.0.70.0000.00717.17
8.0.60.0000.00817.09
8.0.50.0040.00417.01
8.0.30.0130.00817.25
8.0.20.0150.00617.40
8.0.10.0000.00817.29
8.0.00.0110.00716.95
7.4.330.0030.00315.55
7.4.320.0000.00616.79
7.4.300.0000.00716.66
7.4.290.0030.00516.75
7.4.280.0000.00816.87
7.4.270.0040.00416.65
7.4.260.0040.00416.86
7.4.250.0070.00016.79
7.4.240.0040.00416.77
7.4.230.0000.00816.86
7.4.220.0030.01416.77
7.4.210.0110.00716.87
7.4.200.0080.00016.84
7.4.150.0130.00617.40
7.4.140.0150.00617.86
7.4.130.0090.01016.75
7.4.120.0130.01116.71
7.4.110.0070.01016.72
7.4.100.0080.00816.82
7.4.90.0120.01016.67
7.4.80.0090.00919.39
7.4.70.0080.00816.62
7.4.60.0100.00716.80
7.4.50.0060.00916.94
7.4.40.0170.00616.70
7.4.30.0150.00216.76
7.4.00.0030.01415.23
7.3.330.0000.00613.45
7.3.320.0050.00013.39
7.3.310.0000.00716.62
7.3.300.0060.00016.55
7.3.290.0060.00916.52
7.3.280.0130.00516.59
7.3.270.0120.00617.40
7.3.260.0140.00816.57
7.3.250.0130.00516.56
7.3.240.0110.00716.54
7.3.230.0030.01416.47
7.3.210.0070.01016.59
7.3.200.0170.00316.77
7.3.190.0100.00716.68
7.3.180.0060.01516.63
7.3.170.0050.01516.78
7.3.160.0100.00616.66
7.3.10.0180.00016.34
7.3.00.0110.00916.88
7.2.330.0150.00316.95
7.2.320.0110.00616.64
7.2.310.0060.01216.87
7.2.300.0100.01016.95
7.2.290.0100.01316.81
7.2.130.0100.00816.74
7.2.120.0220.00716.82
7.2.110.0130.00916.92
7.2.100.0170.01016.79
7.2.90.0150.00516.87
7.2.80.0100.00916.88
7.2.70.0060.01316.79
7.2.60.0150.00317.01
7.2.50.0100.00817.06
7.2.40.0150.01217.21
7.2.30.0130.00817.01
7.2.20.0120.00517.03
7.2.10.0140.00817.02
7.2.00.0080.00918.11
7.1.250.0110.00715.52
7.1.200.0070.00416.04
7.1.70.0030.00517.49
7.1.60.0630.01115.55
7.1.00.0070.07022.44
7.0.200.0180.00015.00
7.0.120.0070.06022.17
7.0.110.0100.06322.16
7.0.100.0030.06022.05
7.0.90.0030.06722.22
7.0.80.0170.06722.18
7.0.70.0030.08322.03
7.0.60.0200.06022.10
7.0.50.0030.06022.10
7.0.40.0170.05022.11
7.0.30.0100.05722.08
7.0.20.0130.06322.08
7.0.10.0100.06721.98
7.0.00.0200.05022.14
5.6.270.0130.05721.11
5.6.260.0100.08020.87
5.6.250.0130.05021.06
5.6.240.0000.07021.02
5.6.230.0070.07720.85
5.6.220.0270.04720.86
5.6.210.0170.07020.89
5.6.200.0100.07721.04
5.6.190.0070.06020.92
5.6.180.0130.05320.93
5.6.170.0130.05320.93
5.6.160.0170.05021.00
5.6.150.0130.07320.94
5.6.140.0070.06020.92
5.6.130.0200.04721.06
5.6.120.0100.05720.86
5.6.110.0130.07721.00
5.6.100.0130.05721.02
5.6.90.0200.05721.00
5.6.80.0070.05320.14
5.6.70.0130.05720.17
5.6.60.0130.05720.22
5.6.50.0070.05720.31
5.6.40.0100.05020.11
5.6.30.0130.07020.12
5.6.20.0100.07320.34
5.6.10.0030.05720.17
5.6.00.0100.05020.29

preferences:
32.43 ms | 401 KiB | 5 Q