3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = 'location in [chambre, cuisine, salle-de-bain, jardin]'; $regex = <<<REGEX / [a-zA-Z]+ (?= \s+in\s+\[\s* [a-zA-Z-]+\s* (?:,\s*[a-zA-Z-]+\s*)* \] ) | \G(?!^) (?: \s+in\s+\[\s* | \s*,\s* ) \K [a-zA-Z-]+ /x REGEX; preg_match_all($regex, $input, $matches); var_export($matches[0]);

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.5.10.0110.00816.88
8.5.00.0140.00820.16
8.4.160.0130.01023.79
8.4.150.0000.00214.05
8.4.140.0100.01017.95
8.4.130.0060.00718.13
8.4.120.0110.01020.50
8.4.110.0080.00222.75
8.4.100.0100.01017.98
8.4.90.0130.00819.76
8.4.80.0060.00318.10
8.4.70.0110.00917.82
8.4.60.0150.00818.53
8.4.50.0080.01119.68
8.4.40.0040.00418.05
8.4.30.0140.00720.37
8.4.20.0030.01719.76
8.4.10.0060.00319.76
8.3.280.0090.01118.27
8.3.270.0100.01016.66
8.3.260.0100.00816.46
8.3.250.0120.00718.62
8.3.240.0140.00716.84
8.3.230.0060.00516.72
8.3.220.0110.00819.04
8.3.210.0100.00916.48
8.3.200.0050.00416.82
8.3.190.0030.00618.99
8.3.180.0100.00718.69
8.3.170.0110.00716.65
8.3.160.0120.00616.98
8.3.150.0150.00316.68
8.3.140.0080.00020.53
8.3.130.0040.00416.75
8.3.120.0100.00020.50
8.3.110.0080.00020.94
8.3.100.0000.00816.77
8.3.90.0450.00316.50
8.3.80.0370.01316.50
8.3.70.0320.01216.62
8.3.60.0310.01616.38
8.3.50.0460.00316.13
8.3.40.0320.01417.63
8.3.30.0230.00017.63
8.3.20.0140.00517.50
8.3.10.0310.00917.75
8.3.00.0110.00717.63
8.2.290.0080.00820.50
8.2.280.0100.00918.62
8.2.270.0140.00416.84
8.2.260.0110.00718.73
8.2.250.0000.00816.81
8.2.240.0030.00617.18
8.2.230.0100.00022.58
8.2.220.0030.00624.06
8.2.210.0330.00816.68
8.2.200.0400.00416.46
8.2.190.0380.00616.13
8.2.180.0360.00616.47
8.2.170.0410.00317.75
8.2.160.0410.00317.75
8.2.150.0400.00917.34
8.2.140.0420.00717.63
8.2.130.0470.00317.50
8.2.120.0280.00817.50
8.2.110.0210.00717.63
8.2.100.0290.01317.38
8.2.90.0380.00817.71
8.2.80.0280.01217.63
8.2.70.0170.01017.50
8.2.60.0110.01117.63
8.2.50.0240.00017.50
8.2.40.0180.01217.50
8.2.30.0330.00617.63
8.2.20.0330.00717.50
8.2.10.0360.00717.38
8.2.00.0320.01417.50
8.1.330.0080.01122.18
8.1.320.0120.00716.59
8.1.310.0040.00416.54
8.1.300.0060.00320.40
8.1.290.0300.01216.50
8.1.280.0310.01016.38
8.1.270.0350.00317.25
8.1.260.0300.00917.25
8.1.250.0350.00917.48
8.1.240.0240.00817.38
8.1.230.0270.00617.22
8.1.220.0380.00317.25
8.1.210.0320.01117.13
8.1.200.0300.00917.25
8.1.190.0350.00416.97
8.1.180.0360.00417.25
8.1.170.0330.00617.00
8.1.160.0350.00317.34
8.1.150.0330.00617.38
8.1.140.0280.00917.21
8.1.130.0330.00517.25
8.1.120.0200.02017.50
8.1.110.0320.00717.25
8.1.100.0280.00717.34
8.1.90.0280.01017.11
8.1.80.0310.00717.35
8.1.70.0390.00017.35
8.1.60.0300.01317.13
8.1.50.0320.01017.38
8.1.40.0360.00617.38
8.1.30.0360.00717.48
8.1.20.0360.00617.35
8.1.10.0290.01317.35
8.1.00.0330.01617.24

preferences:
39.47 ms | 403 KiB | 5 Q