3v4l.org

run code in 300+ PHP versions simultaneously
<?php //(?=) - positive lookahead $string = "achei quebra; tem aqui;"; $regex = "/\w+(?=;)/"; preg_match_all($regex, $string, $matches); var_dump($matches); //(?!) - negative lookahead / $regex = "/\b\w+\b(?!;)/"; preg_match_all($regex, $string, $matches); var_dump($matches); //(?<=) - positive lookbehind $string = "dra Julia \ndr Marcos \ndr Mateus \ndra Ana"; $regex = "/(?<=dra\s)(\w+)/im"; preg_match_all($regex, $string, $matches); var_dump($matches); //(?<!) - negative lookbehind $regex = "/(?<!^dra\s)\b\w+\b$/im"; preg_match_all($regex, $string, $matches); var_dump($matches); /* (?>) - atomic group */

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.70.0070.00718.43
8.3.60.0120.00618.50
8.3.50.0140.00318.23
8.3.40.0000.01418.81
8.3.30.0140.00418.85
8.3.20.0040.00421.91
8.3.10.0080.00023.68
8.3.00.0080.00020.69
8.2.190.0060.00916.75
8.2.180.0120.00318.66
8.2.170.0140.00422.96
8.2.160.0120.00322.34
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00826.16
8.2.110.0030.00619.39
8.2.100.0040.00817.84
8.2.90.0030.00618.03
8.2.80.0040.00418.98
8.2.70.0080.00017.63
8.2.60.0000.00817.63
8.2.50.0030.00617.75
8.2.40.0000.00719.22
8.2.30.0040.00419.16
8.2.20.0050.00218.25
8.2.10.0000.00819.29
8.2.00.0000.00821.00
8.1.280.0070.01025.92
8.1.270.0100.00020.40
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00423.80
8.1.230.0100.00321.05
8.1.220.0060.00317.74
8.1.210.0030.00618.77
8.1.200.0030.00617.35
8.1.190.0050.00317.22
8.1.180.0040.00418.10
8.1.170.0070.00018.96
8.1.160.0040.00418.98
8.1.150.0070.00018.80
8.1.140.0030.00318.95
8.1.130.0000.00720.16
8.1.120.0040.00417.47
8.1.110.0000.00717.61
8.1.100.0040.00417.48
8.1.90.0040.00417.56
8.1.80.0000.00817.46
8.1.70.0020.00517.45
8.1.60.0040.00417.68
8.1.50.0040.00417.51
8.1.40.0000.00917.63
8.1.30.0040.00417.65
8.1.20.0040.00417.61
8.1.10.0030.00517.75
8.1.00.0050.00217.57
8.0.300.0040.00420.10
8.0.290.0040.00416.63
8.0.280.0000.00718.29
8.0.270.0000.00716.82
8.0.260.0040.00419.96
8.0.250.0000.00717.03
8.0.240.0030.00317.04
8.0.230.0000.00716.94
8.0.220.0030.00316.91
8.0.210.0070.00016.95
8.0.200.0000.00717.06
8.0.190.0000.00716.94
8.0.180.0000.00917.00
8.0.170.0030.00716.96
8.0.160.0000.00717.08
8.0.150.0040.00416.97
8.0.140.0000.00716.96
8.0.130.0040.00413.48
8.0.120.0000.00717.00
8.0.110.0000.00716.93
8.0.100.0000.00717.06
8.0.90.0040.00416.88
8.0.80.0040.01117.06
8.0.70.0040.00416.80
8.0.60.0040.00416.95
8.0.50.0000.00816.83
8.0.30.0110.01217.00
8.0.20.0110.00916.88
8.0.10.0050.00216.97
8.0.00.0070.01416.95
7.4.330.0050.00015.55
7.4.320.0000.00716.74
7.4.300.0030.00316.75
7.4.290.0030.00316.68
7.4.280.0030.00616.73
7.4.270.0000.00716.76
7.4.260.0000.00613.48
7.4.250.0000.00816.69
7.4.240.0030.00416.67
7.4.230.0000.00716.70
7.4.220.0020.00516.73
7.4.210.0100.00616.79
7.4.200.0040.00416.66
7.4.130.0120.00616.55
7.4.120.0030.01716.72
7.4.110.0060.01216.70
7.4.100.0030.01416.49
7.4.90.0060.01216.58
7.4.80.0180.00319.39
7.4.70.0160.00616.47
7.4.60.0060.01116.59
7.4.50.0170.00016.57
7.4.40.0140.00316.43
7.4.10.0080.01115.13
7.4.00.0050.01214.75
7.3.330.0000.00816.10
7.3.320.0020.00213.16
7.3.310.0000.00716.41
7.3.300.0030.00316.32
7.3.290.0070.00016.22
7.3.280.0070.01016.27
7.3.260.0100.01016.55
7.3.240.0060.01116.37
7.3.230.0130.00516.49
7.3.210.0110.00616.56
7.3.200.0120.00616.47
7.3.190.0100.00616.62
7.3.180.0070.01016.59
7.3.170.0090.01216.74
7.3.160.0140.00416.48
7.3.130.0060.01315.03
7.3.120.0070.01114.84
7.3.110.0130.00715.08
7.3.100.0100.00614.83
7.3.90.0070.00914.53
7.3.80.0020.01314.78
7.3.70.0030.00914.70
7.3.60.0070.00614.78
7.3.50.0030.01014.92
7.3.40.0040.01214.88
7.3.30.0070.00714.57
7.3.20.0110.00915.84
7.3.10.0050.01115.54
7.3.00.0100.00715.94
7.2.330.0100.01016.56
7.2.320.0150.00916.61
7.2.310.0080.01116.73
7.2.300.0100.00916.59
7.2.290.0120.00616.58
7.2.260.0060.01314.79
7.2.250.0090.00615.01
7.2.240.0040.01415.12
7.2.230.0070.00814.86
7.2.220.0060.01014.85
7.2.210.0060.00914.97
7.2.200.0050.00715.00
7.2.190.0080.00614.88
7.2.180.0050.01114.81
7.2.170.0030.01214.95
7.2.160.0000.01514.97
7.2.150.0090.01316.08
7.2.140.0080.01015.87
7.2.130.0070.00815.91
7.2.120.0060.01215.96
7.2.110.0090.00715.82
7.2.100.0100.00815.85
7.2.90.0080.00916.12
7.2.80.0080.01015.91
7.2.70.0050.01015.78
7.2.60.0060.00915.93
7.2.50.0080.00915.96
7.2.40.0030.01515.91
7.2.30.0030.01316.01
7.2.20.0050.01115.88
7.2.10.0050.01015.91
7.2.00.0050.01115.88
7.1.330.0040.01115.64
7.1.320.0050.00914.83
7.1.310.0090.00914.99
7.1.300.0060.00914.80
7.1.290.0070.00914.96
7.1.280.0070.00714.84
7.1.270.0080.01214.96
7.1.260.0070.00914.87
7.1.250.0060.01014.96
7.1.240.0000.01515.88
7.1.230.0030.00615.89
7.1.220.0080.00815.54
7.1.210.0040.00815.86
7.1.200.0090.00615.81
7.1.190.0030.01015.62
7.1.180.0030.00915.91
7.1.170.0060.00615.85
7.1.160.0000.01115.69
7.1.150.0030.00716.02
7.1.140.0040.01115.84
7.1.130.0040.01115.94
7.1.120.0030.00915.62
7.1.110.0030.00715.97
7.1.100.0100.00316.07
7.1.90.0110.00415.77
7.1.80.0070.00715.86
7.1.70.0090.00615.63
7.1.60.0070.00715.81
7.1.50.0040.00415.84
7.1.40.0120.00016.02
7.1.30.0030.01015.89
7.1.20.0090.00315.69
7.1.10.0030.00615.55
7.1.00.0040.01015.73

preferences:
18.15 ms | 401 KiB | 5 Q