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.0040.01218.56
8.3.50.0110.00318.44
8.3.40.0040.01118.75
8.3.30.0140.00718.85
8.3.20.0100.00720.39
8.3.10.0100.00618.60
8.3.00.0090.00021.91
8.2.180.0140.00016.63
8.2.170.0170.00322.96
8.2.160.0100.00320.31
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0110.00426.16
8.2.120.0090.00621.24
8.2.110.0030.00721.18
8.2.100.0070.00417.84
8.2.90.0000.00819.09
8.2.80.0080.00017.97
8.2.70.0000.00817.75
8.2.60.0040.00417.80
8.2.50.0000.00818.22
8.2.40.0040.00420.61
8.2.30.0030.00519.08
8.2.20.0040.00418.01
8.2.10.0000.00717.96
8.2.00.0000.00818.06
8.1.280.0040.01125.92
8.1.270.0000.00822.13
8.1.260.0150.00426.35
8.1.250.0050.00328.09
8.1.240.0070.01122.10
8.1.230.0120.00017.71
8.1.220.0030.00617.76
8.1.210.0000.00918.77
8.1.200.0030.00617.23
8.1.190.0080.00417.35
8.1.180.0040.00418.10
8.1.170.0030.00518.59
8.1.160.0000.00818.86
8.1.150.0000.00720.28
8.1.140.0000.00719.00
8.1.130.0000.00718.85
8.1.120.0080.00017.46
8.1.110.0030.00517.52
8.1.100.0080.00017.54
8.1.90.0000.00817.57
8.1.80.0030.00517.54
8.1.70.0000.00717.55
8.1.60.0040.00417.67
8.1.50.0000.00817.55
8.1.40.0000.00817.53
8.1.30.0000.00817.76
8.1.20.0030.00517.79
8.1.10.0040.00417.63
8.1.00.0050.00317.58
8.0.300.0070.00018.77
8.0.290.0040.00416.88
8.0.280.0000.00718.27
8.0.270.0030.00317.20
8.0.260.0030.00318.27
8.0.250.0070.00016.93
8.0.240.0000.00717.01
8.0.230.0040.00416.92
8.0.220.0000.00716.89
8.0.210.0050.00316.93
8.0.200.0030.00516.90
8.0.190.0070.00017.00
8.0.180.0040.00417.00
8.0.170.0060.00317.00
8.0.160.0050.00316.93
8.0.150.0050.00216.98
8.0.140.0000.00716.84
8.0.130.0030.00313.41
8.0.120.0000.00816.90
8.0.110.0000.00716.91
8.0.100.0080.00016.82
8.0.90.0050.00317.02
8.0.80.0060.00916.93
8.0.70.0040.00416.96
8.0.60.0000.00816.96
8.0.50.0040.00417.02
8.0.30.0090.01117.19
8.0.20.0090.01117.44
8.0.10.0000.00817.04
8.0.00.0120.00616.96
7.4.330.0050.00015.55
7.4.320.0030.00316.67
7.4.300.0000.00616.72
7.4.290.0070.00016.71
7.4.280.0000.00816.84
7.4.270.0030.00316.86
7.4.260.0090.00016.66
7.4.250.0040.00416.67
7.4.240.0070.00016.82
7.4.230.0080.00016.84
7.4.220.0100.00716.68
7.4.210.0150.00316.71
7.4.200.0000.00716.51
7.4.160.0090.00816.69
7.4.150.0170.00317.40
7.4.140.0100.00917.86
7.4.130.0080.01716.74
7.4.120.0110.00816.60
7.4.110.0040.01416.43
7.4.100.0110.01116.70
7.4.90.0110.00516.62
7.4.80.0060.01019.39
7.4.70.0100.00716.81
7.4.60.0110.00816.65
7.4.50.0110.00716.69
7.4.40.0160.00816.81
7.4.30.0060.01016.46
7.4.00.0070.00814.94
7.3.330.0000.00513.41
7.3.320.0000.00613.32
7.3.310.0000.00716.29
7.3.300.0040.00416.29
7.3.290.0030.00316.27
7.3.280.0070.00816.34
7.3.270.0070.01017.40
7.3.260.0120.00816.55
7.3.250.0110.00716.44
7.3.240.0130.00416.59
7.3.230.0080.00816.60
7.3.210.0160.00016.34
7.3.200.0130.00316.48
7.3.190.0060.01016.39
7.3.180.0140.00616.45
7.3.170.0090.01216.61
7.3.160.0100.00716.56
7.3.120.0090.00515.07
7.3.110.0070.01114.92
7.3.100.0050.00914.78
7.3.90.0060.00615.01
7.3.80.0070.00814.75
7.3.70.0060.00614.68
7.3.60.0060.00914.90
7.3.50.0080.00514.92
7.3.40.0070.00314.88
7.3.30.0070.00814.87
7.3.20.0080.00816.78
7.3.10.0060.00816.70
7.3.00.0050.01016.77
7.2.330.0100.00716.81
7.2.320.0110.01116.49
7.2.310.0060.01216.61
7.2.300.0070.01416.73
7.2.290.0070.01016.87
7.2.250.0100.01015.10
7.2.240.0100.01015.08
7.2.230.0100.00515.20
7.2.220.0090.00515.33
7.2.210.0030.01115.18
7.2.200.0070.00615.06
7.2.190.0050.00514.93
7.2.180.0030.01015.17
7.2.170.0070.00314.99
7.2.60.0000.01517.17
7.2.00.0100.00519.45
7.1.330.0050.00915.72
7.1.320.0030.00715.97
7.1.310.0070.00815.88
7.1.300.0060.00615.81
7.1.290.0060.00616.01
7.1.280.0090.00615.96
7.1.270.0120.00216.02
7.1.260.0030.01115.88
7.1.200.0070.00315.87
7.1.120.0090.00619.10
7.1.110.0080.00818.12
7.1.100.0000.01418.55
7.1.90.0040.01118.00
7.1.80.0040.01118.27
7.1.70.0000.01517.25
7.1.60.0230.00335.23
7.1.50.0140.01735.11
7.1.40.0160.01334.49
7.1.30.0200.01034.78
7.1.20.0160.01234.57
7.1.10.0070.00716.70
7.1.00.0070.01016.76

preferences:
59.37 ms | 401 KiB | 5 Q