3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text1 = 'I wanna match pattern 1 which is very different from pattern 2'; $text2 = 'I wanna match pattern 2, again nothing similar with pattern 1 here'; $regex = '/(?J)I wanna match pattern (?<number>1) which is very different from pattern 2|(?<number>2), again nothing similar with pattern 1 here/'; echo "Pattern 1\n"; preg_match_all( $regex, $text1, $matches ); var_dump($matches['number'][0]); echo "\n\nPattern 2\n"; preg_match_all( $regex, $text2, $matches ); var_dump($matches['number'][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.00.0120.01020.26
8.4.150.0010.00114.05
8.4.140.0130.00817.89
8.4.130.0100.01017.86
8.4.120.0140.00624.17
8.4.110.0160.00519.89
8.4.100.0070.01018.77
8.4.90.0130.00619.02
8.4.80.0130.00720.59
8.4.70.0080.00118.06
8.4.60.0140.00818.70
8.4.50.0110.00918.96
8.4.40.0030.00717.60
8.4.30.0100.01019.70
8.4.20.0040.00417.89
8.4.10.0170.00017.85
8.3.280.0100.01118.61
8.3.270.0160.00316.66
8.3.260.0130.00516.50
8.3.250.0140.00618.94
8.3.240.0150.00517.05
8.3.230.0100.00716.42
8.3.220.0060.00318.91
8.3.210.0070.00916.68
8.3.200.0040.00716.52
8.3.190.0100.00917.00
8.3.180.0070.00816.61
8.3.170.0070.01118.85
8.3.160.0000.01817.23
8.3.150.0030.00717.05
8.3.140.0000.00816.91
8.3.130.0060.00918.36
8.3.120.0070.00418.97
8.3.110.0120.00620.94
8.3.100.0060.00916.80
8.3.90.0060.00318.54
8.3.80.0030.00618.43
8.3.70.0210.00018.40
8.3.60.0030.01216.63
8.3.50.0160.00221.98
8.3.40.0140.00019.06
8.3.30.0040.01118.94
8.3.20.0000.00820.16
8.3.10.0100.00023.70
8.3.00.0060.00321.85
8.2.290.0110.00920.63
8.2.280.0070.00118.79
8.2.270.0080.01219.20
8.2.260.0100.01018.64
8.2.250.0050.00318.73
8.2.240.0000.00817.26
8.2.230.0180.00422.58
8.2.220.0070.00724.06
8.2.210.0000.00826.77
8.2.200.0040.00418.41
8.2.190.0070.00716.58
8.2.180.0250.01118.14
8.2.170.0070.01322.96
8.2.160.0140.00019.46
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00421.00
8.2.110.0060.00321.24
8.2.100.0040.00717.97
8.2.90.0050.00317.97
8.2.80.0030.00618.03
8.2.70.0000.00917.80
8.2.60.0070.00318.22
8.2.50.0040.00418.10
8.2.40.0000.00720.55
8.2.30.0040.00719.28
8.2.20.0040.00417.98
8.2.10.0060.00318.02
8.2.00.0000.00718.25
8.1.330.0080.00822.02
8.1.320.0120.00716.52
8.1.310.0000.00817.02
8.1.300.0040.01518.34
8.1.290.0100.00018.88
8.1.280.0120.00325.92
8.1.270.0040.00422.15
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00622.20
8.1.230.0080.00322.82
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.38
8.1.190.0050.00317.35
8.1.180.0090.00018.10
8.1.170.0040.00418.68
8.1.160.0040.00418.77
8.1.150.0040.00420.00
8.1.140.0040.00419.50
8.1.130.0040.00417.49
8.1.120.0040.00417.58
8.1.110.0000.00717.37
8.1.100.0000.00917.52
8.1.90.0000.00817.50
8.1.80.0030.00517.54
8.1.70.0000.00717.45
8.1.60.0000.00817.65
8.1.50.0040.00417.62
8.1.40.0060.00617.57
8.1.30.0000.00717.75
8.1.20.0080.00017.64
8.1.10.0000.00817.61
8.1.00.0060.00317.66
8.0.300.0060.00319.77
8.0.290.0040.00416.88
8.0.280.0000.00718.40
8.0.270.0040.00416.92
8.0.260.0030.00316.96
8.0.250.0000.00716.94
8.0.240.0080.00017.04
8.0.230.0070.00017.05
8.0.220.0070.00017.00
8.0.210.0000.00816.93
8.0.200.0030.00316.97
8.0.190.0000.00816.99
8.0.180.0040.00416.96
8.0.170.0080.00016.84
8.0.160.0070.00016.86
8.0.150.0050.00516.95
8.0.140.0070.00016.97
8.0.130.0050.00013.43
8.0.120.0000.00716.86
8.0.110.0070.00016.84
8.0.100.0000.00716.84
8.0.90.0000.00717.06
8.0.80.0030.01216.99
8.0.70.0040.00416.84
8.0.60.0040.00416.96
8.0.50.0050.00317.04
8.0.30.0080.01117.40
8.0.20.0120.00817.40
8.0.10.0040.00417.01
8.0.00.0120.00916.70
7.4.330.0020.00215.55
7.4.320.0050.00216.79
7.4.300.0060.00016.69
7.4.290.0040.00416.53
7.4.280.0050.00216.64
7.4.270.0070.00016.70
7.4.260.0040.00416.67
7.4.250.0030.00316.75
7.4.240.0030.00516.55
7.4.230.0040.00416.49
7.4.220.0110.00816.80
7.4.210.0120.00316.85
7.4.200.0050.00216.54
7.4.160.0110.00516.70
7.4.150.0060.01017.40
7.4.140.0120.01117.86
7.4.130.0120.00716.53
7.4.120.0070.01516.63
7.4.110.0100.00716.84
7.4.100.0150.00016.65
7.4.90.0100.00716.71
7.4.80.0180.00019.39
7.4.70.0060.01316.55
7.4.60.0120.00616.71
7.4.50.0040.01416.54
7.4.40.0060.01116.57
7.4.30.0170.00716.77
7.4.00.0030.01314.83
7.3.330.0000.00513.13
7.3.320.0060.00013.33
7.3.310.0070.00016.29
7.3.300.0070.00016.38
7.3.290.0070.00716.41
7.3.280.0080.01116.41
7.3.270.0130.00317.40
7.3.260.0160.00416.69
7.3.250.0090.00816.56
7.3.240.0110.00816.36
7.3.230.0070.01116.80
7.3.210.0110.00616.57
7.3.200.0100.00716.44
7.3.190.0090.00816.58
7.3.180.0040.01216.76
7.3.170.0120.00916.61
7.3.160.0100.00716.73
7.2.330.0170.00016.70
7.2.320.0060.01316.52
7.2.310.0120.00416.79
7.2.300.0130.00716.55
7.2.290.0090.00916.60
7.2.80.0110.00416.61
7.2.60.0040.01017.13
7.2.50.0090.00616.92
7.1.200.0030.01015.94
7.1.70.0000.00817.49
7.1.60.0030.00717.17
7.1.30.2000.08336.52
7.1.20.1300.05336.54
7.1.10.1630.06020.46
7.1.00.1730.05320.54
7.0.200.0030.01116.86
7.0.170.1170.06020.20
7.0.160.1030.06720.14
7.0.150.1900.05720.03
7.0.140.2400.06320.09
7.0.130.1800.05320.21
7.0.120.1430.05320.12
7.0.110.1530.05720.05
7.0.100.2200.05020.15
7.0.90.2270.06020.08
7.0.80.1600.05720.13
7.0.70.2730.04720.13
7.0.60.2170.07719.85
7.0.50.1330.05720.13
7.0.40.1570.05720.06
7.0.30.2130.05720.06
7.0.20.1430.05020.13
7.0.10.1770.06320.04
7.0.00.1300.05720.05

preferences:
190.37 ms | 403 KiB | 5 Q