3v4l.org

run code in 300+ PHP versions simultaneously
<?php function extractVars($pattern){ //Extract if function $array_vars = []; $rgx = '/^(?<startOfS>.*?)\{=IF\((device=mobile|audience IN\(.*?\)),(.*?)\):(.*?)\}(?<endOfS>.*?)$/'; preg_match_all($rgx, $pattern, $matches, PREG_SET_ORDER, 0); print_r($matches); return $array_vars; } $var = extractVars("Get The Best Shoes At The Best Price. {=IF(device=mobile,Free Shipping on Mobile Orders!):Buy Now!}"); print_r($var);

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.0190.00318.30
8.3.50.0030.01718.33
8.3.40.0070.01518.79
8.3.30.0100.01318.79
8.3.20.0080.00020.21
8.3.10.0120.00418.80
8.3.00.0080.00023.66
8.2.180.0150.00318.18
8.2.170.0120.00322.96
8.2.160.0070.00722.06
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00022.38
8.2.120.0040.01126.35
8.2.110.0030.00722.39
8.2.100.0120.00317.91
8.2.90.0040.00419.10
8.2.80.0060.00317.97
8.2.70.0050.00317.75
8.2.60.0030.00518.04
8.2.50.0030.00618.10
8.2.40.0050.00322.34
8.2.30.0040.00419.17
8.2.20.0070.00317.89
8.2.10.0050.00318.08
8.2.00.0040.00418.01
8.1.280.0080.00825.92
8.1.270.0000.00822.08
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00622.19
8.1.230.0070.00417.70
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0100.00017.35
8.1.190.0040.00417.35
8.1.180.0050.00318.10
8.1.170.0050.00318.59
8.1.160.0070.00018.75
8.1.150.0040.00420.21
8.1.140.0000.00819.16
8.1.130.0000.00820.59
8.1.120.0040.00717.43
8.1.110.0020.00517.61
8.1.100.0000.00717.40
8.1.90.0050.00217.52
8.1.80.0040.00417.59
8.1.70.0000.00717.46
8.1.60.0030.00617.79
8.1.50.0000.00817.66
8.1.40.0000.00817.68
8.1.30.0080.00017.81
8.1.20.0060.00317.75
8.1.10.0000.00717.69
8.1.00.0090.00317.62
8.0.300.0020.00518.77
8.0.290.0050.00216.75
8.0.280.0030.00318.40
8.0.270.0030.00317.12
8.0.260.0000.00618.84
8.0.250.0030.00316.92
8.0.240.0000.00716.90
8.0.230.0030.00516.94
8.0.220.0040.00417.00
8.0.210.0000.00716.88
8.0.200.0080.00017.05
8.0.190.0050.00317.00
8.0.180.0070.00016.88
8.0.170.0050.00316.95
8.0.160.0050.00216.98
8.0.150.0050.00616.94
8.0.140.0070.00016.94
8.0.130.0050.00013.36
8.0.120.0040.00416.93
8.0.110.0040.00416.98
8.0.100.0070.00016.92
8.0.90.0030.00517.00
8.0.80.0070.01017.02
8.0.70.0040.00416.97
8.0.60.0000.00817.09
8.0.50.0040.00416.92
8.0.30.0080.00917.03
8.0.20.0100.00917.40
8.0.10.0030.00517.13
8.0.00.0120.01317.02
7.4.330.0000.00415.55
7.4.320.0000.00616.75
7.4.300.0030.00316.79
7.4.290.0070.00016.85
7.4.280.0030.00316.79
7.4.270.0030.00316.81
7.4.260.0030.00516.65
7.4.250.0040.00416.62
7.4.240.0050.00316.78
7.4.230.0070.00016.71
7.4.220.0070.01016.57
7.4.210.0100.00716.79
7.4.200.0000.00716.74
7.4.160.0100.00916.65
7.4.150.0120.00617.40
7.4.140.0100.00917.86
7.4.130.0090.00916.77
7.4.120.0110.01016.70
7.4.110.0170.00016.77
7.4.100.0150.00616.67
7.4.90.0030.01316.73
7.4.80.0130.00319.39
7.4.70.0140.00316.57
7.4.60.0040.01616.55
7.4.50.0050.00516.63
7.4.40.0140.00816.65
7.4.30.0070.01016.37
7.4.00.0070.01115.22
7.3.330.0050.00013.27
7.3.320.0000.00513.36
7.3.310.0000.00816.43
7.3.300.0000.00716.21
7.3.290.0000.00716.29
7.3.280.0060.01116.39
7.3.270.0090.00917.40
7.3.260.0120.00516.42
7.3.250.0090.01016.59
7.3.240.0070.01016.61
7.3.230.0120.00916.42
7.3.210.0170.00016.40
7.3.200.0100.00716.61
7.3.190.0130.00316.63
7.3.180.0180.00916.21
7.3.170.0130.00316.67
7.3.160.0030.01516.38
7.3.120.0030.01515.18
7.3.110.0110.00715.15
7.3.100.0070.01014.57
7.3.90.0000.01215.04
7.3.80.0000.01514.55
7.3.70.0000.01214.81
7.3.60.0040.01115.00
7.3.50.0000.01114.86
7.3.40.0000.01414.83
7.3.30.0000.01414.98
7.3.20.0000.01416.52
7.3.10.0030.00616.47
7.3.00.0040.01116.76
7.2.330.0140.00316.75
7.2.320.0090.01216.50
7.2.310.0080.00816.70
7.2.300.0100.01016.73
7.2.290.0110.00716.59
7.2.250.0070.01115.03
7.2.240.0070.01315.26
7.2.230.0090.00615.19
7.2.220.0000.01414.88
7.2.210.0090.00615.36
7.2.200.0060.00615.10
7.2.190.0060.00614.76
7.2.180.0030.01215.27
7.2.170.0030.01015.03
7.2.110.0030.01216.48
7.2.60.0040.01216.78
7.2.00.0100.01019.73
7.1.330.0000.01216.13
7.1.320.0070.00716.10
7.1.310.0000.01416.02
7.1.300.0040.00815.96
7.1.290.0000.01315.93
7.1.280.0100.00315.97
7.1.270.0030.00915.91
7.1.260.0030.00715.72
7.1.200.0080.00015.86
7.1.120.0100.01317.08
7.1.110.0030.01018.41
7.1.100.0000.01518.62
7.1.90.0000.01318.12
7.1.80.0090.00917.99
7.1.70.0100.01315.71
7.1.60.0200.01735.36
7.1.50.0170.01034.94
7.1.40.0220.00634.55
7.1.30.0230.01032.85
7.1.20.0170.01732.97
7.1.10.0000.01316.75
7.1.00.0030.01116.95

preferences:
58.16 ms | 400 KiB | 5 Q