3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "age<21,length>10,height<>10,width!=100,name='Emma Einarsson' or it can be words time>=10,clouds<=4", "age < 21, length > 10, height <> 10, width != 100, name = 'Emma Einarsson' or it can be words time >= 10, clouds <= 4", "My name is Emma and i have a dillemma, what's the distance between 'New York' and 'Athene' ?", "'New York' and London at the start and end with Paris and 'Los Angeles'" ]; foreach ($strings as $string) { var_export(preg_match_all("~\B'\K(?:[^']+)|\b[a-z']+\b|\d+|[<>!=?]+~i", $string, $out) ? $out[0] : 'fail'); echo "\n"; }

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.4.140.0140.01117.60
8.4.130.0090.01220.17
8.4.120.0080.00820.34
8.4.110.0140.00722.66
8.4.100.0150.00519.61
8.4.90.0120.00818.66
8.4.80.0120.00817.86
8.4.70.0120.00818.28
8.4.60.0070.00418.84
8.4.50.0100.01117.91
8.4.40.0140.00717.77
8.4.30.0100.01019.82
8.4.20.0140.00719.67
8.4.10.0070.01017.86
8.3.270.0120.00816.55
8.3.260.0060.00316.79
8.3.250.0110.00818.86
8.3.240.0110.00816.57
8.3.230.0130.00616.79
8.3.220.0120.00717.13
8.3.210.0050.00616.67
8.3.200.0040.00516.48
8.3.190.0120.00917.01
8.3.180.0100.00717.05
8.3.170.0070.01116.61
8.3.160.0160.00316.63
8.3.150.0160.00318.93
8.3.140.0040.01616.48
8.3.130.0170.00318.68
8.3.120.0030.01318.71
8.3.110.0040.00420.94
8.3.100.0100.00624.06
8.3.90.0040.00426.77
8.3.80.0070.00317.97
8.3.70.0110.00716.60
8.3.60.0140.00418.30
8.3.50.0160.00717.86
8.3.40.0110.00418.92
8.3.30.0110.00419.00
8.3.20.0040.00421.77
8.3.10.0080.00023.52
8.3.00.0000.00823.48
8.2.290.0120.00620.68
8.2.280.0110.00818.34
8.2.270.0070.01117.19
8.2.260.0090.00920.79
8.2.250.0090.00016.85
8.2.240.0120.00919.10
8.2.230.0090.00022.58
8.2.220.0060.00337.54
8.2.210.0090.00926.77
8.2.200.0000.00916.75
8.2.190.0110.00416.88
8.2.180.0170.00318.77
8.2.170.0130.00718.95
8.2.160.0100.00322.96
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0060.00321.16
8.2.120.0040.00426.35
8.2.110.0060.00320.95
8.2.100.0120.00018.03
8.2.90.0080.00017.97
8.2.80.0090.00018.11
8.2.70.0050.00317.93
8.2.60.0040.00417.93
8.2.50.0040.00418.34
8.2.40.0070.00319.36
8.2.30.0000.00819.42
8.2.20.0000.00818.04
8.2.10.0070.00018.01
8.2.00.0000.00818.14
8.1.330.0100.00921.94
8.1.320.0130.00616.46
8.1.310.0040.00716.89
8.1.300.0050.00318.20
8.1.290.0030.00630.84
8.1.280.0100.01025.92
8.1.270.0040.00422.05
8.1.260.0080.00026.35
8.1.250.0100.00028.09
8.1.240.0030.00623.85
8.1.230.0030.00921.02
8.1.220.0090.00017.77
8.1.210.0060.00318.77
8.1.200.0000.00817.48
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0050.00318.63
8.1.160.0020.00518.93
8.1.150.0070.00020.86
8.1.140.0050.00217.79
8.1.130.0070.00020.76
8.1.120.0040.00417.60
8.1.110.0000.00917.63
8.1.100.0000.00817.55
8.1.90.0040.00417.58
8.1.80.0040.00717.63
8.1.70.0050.00217.64
8.1.60.0050.00517.69
8.1.50.0030.00517.59
8.1.40.0040.00417.61
8.1.30.0030.00617.77
8.1.20.0060.00317.77
8.1.10.0000.00817.63
8.1.00.0030.00517.56
8.0.300.0070.00020.00
8.0.290.0000.00716.88
8.0.280.0040.00418.36
8.0.270.0040.00417.31
8.0.260.0000.00617.21
8.0.250.0030.00317.15
8.0.240.0030.00317.04
8.0.230.0040.00417.11
8.0.220.0040.00417.04
8.0.210.0030.00317.05
8.0.200.0030.00317.01
8.0.190.0000.00817.08
8.0.180.0040.00417.00
8.0.170.0000.00817.08
8.0.160.0000.00917.11
8.0.150.0040.00417.02
8.0.140.0000.00817.02
8.0.130.0000.00513.54
8.0.120.0040.00416.92
8.0.110.0060.00316.95
8.0.100.0000.00816.93
8.0.90.0000.00716.95
8.0.80.0080.00817.05
8.0.70.0000.00717.14
8.0.60.0000.00716.84
8.0.50.0040.00416.94
8.0.30.0080.01017.27
8.0.20.0090.01017.40
8.0.10.0000.00717.18
8.0.00.0110.00617.00
7.4.330.0000.00415.55
7.4.320.0080.00016.84
7.4.300.0060.00016.84
7.4.290.0060.00316.87
7.4.280.0040.00416.77
7.4.270.0040.00416.69
7.4.260.0000.00716.86
7.4.250.0080.00016.63
7.4.240.0030.00316.73
7.4.230.0030.00316.84
7.4.220.0000.00816.92
7.4.210.0050.01316.84
7.4.200.0000.00816.68
7.4.160.0080.00816.68
7.4.140.0110.00717.86
7.4.130.0060.01216.71
7.4.120.0090.01016.73
7.4.110.0070.00916.56
7.4.100.0070.01116.68
7.4.90.0110.00716.57
7.4.80.0080.01119.39
7.4.70.0090.00816.71
7.4.60.0050.01416.58
7.4.50.0150.00016.67
7.4.40.0100.00716.57
7.4.10.0040.01415.17
7.4.00.0120.00715.24
7.3.330.0050.00013.41
7.3.320.0060.00013.33
7.3.310.0000.00716.43
7.3.300.0000.00716.50
7.3.290.0000.00716.43
7.3.280.0090.00916.42
7.3.260.0140.01316.70
7.3.240.0100.00816.66
7.3.230.0170.00816.57
7.3.210.0070.01616.55
7.3.200.0060.01016.46
7.3.190.0060.01016.71
7.3.180.0030.01216.67
7.3.170.0080.00916.56
7.3.160.0100.00716.49
7.3.130.0060.01315.00
7.3.120.0060.01315.08
7.3.110.0100.01014.93
7.3.100.0070.00714.68
7.3.90.0060.01114.96
7.3.80.0110.00315.11
7.3.70.0040.01115.08
7.3.60.0100.00714.92
7.3.50.0040.01114.88
7.3.40.0110.00415.09
7.3.30.0070.00714.84
7.3.20.0040.01116.61
7.3.10.0070.00716.86
7.3.00.0070.00316.82
7.2.330.0100.01316.79
7.2.320.0060.01416.95
7.2.310.0090.00916.90
7.2.300.0140.00316.77
7.2.290.0120.00916.88
7.2.260.0060.01215.19
7.2.250.0030.01315.15
7.2.240.0040.00815.33
7.2.230.0100.00615.22
7.2.220.0060.00315.06
7.2.210.0080.00815.37
7.2.200.0060.01015.26
7.2.190.0040.01515.17
7.2.180.0100.00715.22
7.2.170.0050.00515.38
7.2.160.0000.01315.34
7.2.150.0000.01417.34
7.2.140.0030.00917.09
7.2.130.0030.01017.32
7.2.120.0000.01516.89
7.2.110.0040.01217.30
7.2.100.0090.00616.84
7.2.90.0100.00716.92
7.2.80.0090.00816.96
7.2.70.0060.00616.90
7.2.60.0030.01217.01
7.2.50.0030.01117.10
7.2.40.0360.01217.65
7.2.30.0340.01117.74
7.2.20.0420.01117.65
7.2.10.0330.01117.63
7.2.00.0390.00917.71
7.1.330.0070.00715.95
7.1.320.0070.01116.01
7.1.310.0040.00416.01
7.1.300.0090.00615.93
7.1.290.0080.00416.09
7.1.280.0000.01415.84
7.1.270.0070.00715.73
7.1.260.0030.00615.79
7.1.250.0120.00315.88
7.1.240.0080.00015.90
7.1.230.0060.00815.79
7.1.220.0030.00616.17
7.1.210.0030.01016.04
7.1.200.0090.00416.01
7.1.190.0060.00615.98
7.1.180.0000.01316.07
7.1.170.0070.00715.99
7.1.160.0560.01116.65
7.1.150.0350.00716.57
7.1.140.0310.00716.58
7.1.130.0410.01016.57
7.1.120.0420.00716.52
7.1.110.0380.01316.40
7.1.100.0370.00916.17
7.1.90.0420.00816.36
7.1.80.0450.00916.18
7.1.70.0490.00715.62
7.1.60.0530.01324.87
7.1.50.0590.00924.58
7.1.40.0540.01024.43
7.1.30.0550.01024.27
7.1.20.0560.00824.59
7.1.10.0490.01015.40
7.1.00.0400.00815.46
7.0.330.0000.01515.52
7.0.320.0030.00615.61
7.0.310.0000.01615.63
7.0.300.0040.01115.63
7.0.290.0040.00815.50
7.0.280.0090.00615.44
7.0.270.0030.01315.68
7.0.260.0040.00715.67
7.0.250.0100.00315.40
7.0.240.0030.00615.59
7.0.230.0030.01015.74
7.0.220.0060.00615.67
7.0.210.0040.00415.45
7.0.200.0030.01015.33
7.0.190.0110.00315.65
7.0.180.0090.00915.54
7.0.170.0030.00615.41
7.0.160.0040.00715.60
7.0.150.0060.00615.65
7.0.140.0040.00915.61
7.0.130.0080.00315.69
7.0.120.0060.00315.34
7.0.110.0060.00615.57
7.0.100.0110.00415.59
7.0.90.0000.01015.46
7.0.80.0000.01015.65
7.0.70.0030.00915.54
7.0.60.0000.01115.66
7.0.50.0080.00415.60
7.0.40.0030.01013.55
7.0.30.0030.00713.88
7.0.20.0070.00713.76
7.0.10.0070.00713.46
7.0.00.0060.00313.38
5.6.400.0000.01114.33
5.6.390.0040.00414.47
5.6.380.0100.00714.54
5.6.370.0000.01214.25
5.6.360.0000.01414.56
5.6.350.0040.00414.46
5.6.340.0040.00814.41
5.6.330.0080.00314.73
5.6.320.0090.00614.59
5.6.310.0080.00414.77
5.6.300.0090.00314.34
5.6.290.0080.00414.04
5.6.280.0000.00914.79
5.6.270.0030.01014.52
5.6.260.0070.00714.52
5.6.250.0040.00714.28
5.6.240.0030.01414.38
5.6.230.0090.00314.42
5.6.220.0050.00514.45
5.6.210.0100.00014.54
5.6.200.0000.01414.24
5.6.190.0060.00614.64
5.6.180.0000.01114.54
5.6.170.0030.00614.15
5.6.160.0060.00914.36
5.6.150.0000.01414.50
5.6.140.0130.00014.30
5.6.130.0090.00014.31
5.6.120.0110.00314.45
5.6.110.0030.00614.23
5.6.100.0090.00014.41
5.6.90.0030.00914.29
5.6.80.0150.00014.34
5.6.70.0120.00314.46
5.6.60.0070.01114.44
5.6.50.0080.00814.36
5.6.40.0050.00914.39
5.6.30.0090.00914.54
5.6.20.0070.00714.63
5.6.10.0100.00614.49
5.6.00.0060.01214.30

preferences:
31.91 ms | 403 KiB | 5 Q