3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'xxxx xxxx xx xxxx xxx foo xxx xxx xxxxx\nxxxx xx foo xxx xxx xxxxx\nxx xxxxx xxxx xx xxx xx bar xx xxxx\nxxxxxx xx xxxxx x xxxx bar\nxxx xxxxx xx xx foo_sub1 xxx xxxx\nxx foo_sub2 xxxxx xxx x xxxx\nxxx xx foo1_sub1 xxx xxxx\nxxxxx foo1_sub2 xxxxx xxx x xxxx'; if (preg_match_all('~\bfoo(?:_\w+)?\b~', $str, $matches)) { print_r($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.0130.00716.80
8.5.00.0120.01020.19
8.4.150.0010.00014.05
8.4.140.0130.00718.01
8.4.130.0090.01017.76
8.4.120.0120.00923.78
8.4.110.0120.00919.05
8.4.100.0130.00718.72
8.4.90.0100.01120.91
8.4.80.0070.00218.90
8.4.70.0110.00918.92
8.4.60.0060.00418.82
8.4.50.0120.00817.93
8.4.40.0140.00718.44
8.4.30.0130.00718.78
8.4.20.0070.01420.56
8.4.10.0080.00017.77
8.3.280.0180.01018.66
8.3.270.0160.00716.64
8.3.260.0110.00916.65
8.3.250.0140.00616.83
8.3.240.0110.00817.11
8.3.230.0110.00516.81
8.3.220.0080.00719.11
8.3.210.0080.00716.59
8.3.200.0090.01116.38
8.3.190.0080.00916.85
8.3.180.0100.00316.55
8.3.170.0070.01118.77
8.3.160.0100.00717.08
8.3.150.0070.01117.07
8.3.140.0050.00518.60
8.3.130.0040.00416.85
8.3.120.0060.00318.96
8.3.110.0030.00620.94
8.3.100.0040.00424.06
8.3.90.0060.00326.77
8.3.80.0030.00620.11
8.3.70.0120.00316.63
8.3.60.0210.00016.63
8.3.50.0090.00924.46
8.3.40.0070.01020.38
8.3.30.0070.00718.92
8.3.20.0040.00421.90
8.3.10.0000.00821.98
8.3.00.0000.00820.69
8.2.290.0120.00722.28
8.2.280.0140.00518.86
8.2.270.0040.01417.04
8.2.260.0050.00516.74
8.2.250.0030.01216.74
8.2.240.0000.00817.29
8.2.230.0100.00722.58
8.2.220.0080.00037.54
8.2.210.0050.00326.77
8.2.200.0060.00316.75
8.2.190.0100.01016.75
8.2.180.0000.01518.79
8.2.170.0160.00622.96
8.2.160.0100.00321.18
8.2.150.0050.00324.18
8.2.140.0050.00224.66
8.2.130.0050.00326.16
8.2.120.0080.00020.93
8.2.110.0060.00321.25
8.2.100.0080.00317.97
8.2.90.0090.00020.46
8.2.80.0050.00320.33
8.2.70.0040.00417.80
8.2.60.0000.00818.22
8.2.50.0080.00019.28
8.2.40.0030.00919.48
8.2.30.0040.00419.08
8.2.20.0100.00017.90
8.2.10.0000.00719.11
8.2.00.0040.00419.12
8.1.330.0120.00621.89
8.1.320.0090.01118.37
8.1.310.0060.00316.53
8.1.300.0130.00620.43
8.1.290.0040.00830.84
8.1.280.0130.00325.92
8.1.270.0030.00723.82
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00622.11
8.1.230.0040.00720.83
8.1.220.0080.00017.74
8.1.210.0080.00018.79
8.1.200.0030.00617.35
8.1.190.0000.00817.13
8.1.180.0000.00819.03
8.1.170.0090.00018.59
8.1.160.0000.00819.10
8.1.150.0040.00418.85
8.1.140.0000.00718.70
8.1.130.0040.00421.89
8.1.120.0080.00017.59
8.1.110.0000.00717.61
8.1.100.0060.00317.47
8.1.90.0070.00017.55
8.1.80.0050.00217.45
8.1.70.0000.00717.43
8.1.60.0060.00317.72
8.1.50.0040.00417.51
8.1.40.0030.00617.63
8.1.30.0000.00717.71
8.1.20.0060.00317.71
8.1.10.0060.00317.66
8.1.00.0040.00417.69
8.0.300.0040.00420.10
8.0.290.0040.00416.75
8.0.280.0070.00018.41
8.0.270.0020.00516.91
8.0.260.0030.00619.93
8.0.250.0030.00317.06
8.0.240.0000.00616.93
8.0.230.0070.00017.04
8.0.220.0030.00316.93
8.0.210.0030.00316.86
8.0.200.0080.00016.99
8.0.190.0030.00316.98
8.0.180.0060.00316.98
8.0.170.0060.00617.00
8.0.160.0060.00317.03
8.0.150.0000.00716.88
8.0.140.0000.00716.92
8.0.130.0060.00013.36
8.0.120.0030.00616.82
8.0.110.0070.00016.90
8.0.100.0040.00416.77
8.0.90.0030.00616.89
8.0.80.0070.01116.98
8.0.70.0000.00716.96
8.0.60.0000.00716.79
8.0.50.0050.00316.98
8.0.30.0070.01017.29
8.0.20.0100.01017.22
8.0.10.0030.00516.94
8.0.00.0160.00717.04
7.4.330.0020.00215.55
7.4.320.0000.00616.67
7.4.300.0000.00616.70
7.4.290.0000.00716.64
7.4.280.0040.00416.63
7.4.270.0080.00016.54
7.4.260.0030.00313.48
7.4.250.0050.00216.75
7.4.240.0050.00316.67
7.4.230.0070.00016.85
7.4.220.0020.00516.64
7.4.210.0030.01316.68
7.4.200.0070.00016.73
7.4.130.0130.00416.64
7.4.120.0070.01016.82
7.4.110.0180.00016.65
7.4.100.0060.01216.59
7.4.90.0120.01216.50
7.4.80.0130.00419.39
7.4.70.0070.01416.63
7.4.60.0060.01216.67
7.4.50.0060.00916.38
7.4.40.0130.00416.48
7.4.30.0130.00916.39
7.4.20.0140.00616.39
7.4.10.0090.01316.51
7.4.00.0040.01216.70
7.3.330.0030.00316.31
7.3.320.0050.00013.08
7.3.310.0030.00316.20
7.3.300.0000.00716.35
7.3.290.0090.00716.37
7.3.280.0070.01316.39
7.3.260.0110.00616.52
7.3.230.0090.00916.64
7.3.210.0090.00916.36
7.3.200.0150.00716.41
7.3.190.0130.00316.29
7.3.180.0090.01016.44
7.3.170.0120.00616.45
7.3.160.0070.00716.27
7.3.150.0070.01316.30
7.3.140.0000.01816.54
7.3.130.0040.01316.37
7.3.120.0080.00816.36
7.3.110.0130.00416.59
7.3.100.0040.01316.21
7.3.90.0110.00716.48
7.3.80.0100.00716.27
7.3.70.0090.00816.45
7.3.60.0150.00316.31
7.3.50.0030.01416.46
7.3.40.0040.01116.47
7.3.30.0260.03216.45
7.3.20.0090.01216.54
7.3.10.0030.01916.57
7.3.00.0110.01216.51
7.2.330.0090.01516.77
7.2.320.0090.00916.58
7.2.310.0080.00916.74
7.2.300.0090.00616.81
7.2.290.0100.01016.52
7.2.280.0090.00916.70
7.2.270.0090.00916.69
7.2.260.0070.01116.67
7.2.250.0080.01016.50
7.2.240.0110.00616.46
7.2.230.0090.00916.55
7.2.220.0090.00916.62
7.2.210.0100.00716.51
7.2.200.0040.01416.47
7.2.190.0040.01516.38
7.2.180.0080.00816.68
7.2.170.0180.01016.56
7.2.160.0140.00816.66
7.2.150.0130.01016.60
7.2.140.0160.00616.71
7.2.130.0170.00916.71
7.2.120.0130.01016.64
7.2.110.0160.00916.66
7.2.100.0030.02016.59
7.2.90.0130.01016.61
7.2.80.0170.00716.69
7.2.70.0120.00616.50
7.2.60.0140.00516.40
7.2.50.0270.01216.58
7.2.40.0090.00916.64
7.2.30.0070.01416.77
7.2.20.0090.00916.51
7.2.10.0140.00316.62
7.2.00.0090.00916.72

preferences:
160.61 ms | 403 KiB | 5 Q