3v4l.org

run code in 300+ PHP versions simultaneously
<?php $patern = '<html> <head> <link href="templates/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <title>TEST</title> </head> <body> <table class="table table-striped table-hover"> <thead> <tr> <th>#</th> <th>Title</th> <th>Category</th> <th>date</th> <th>Options</th> </tr> </thead> <tbody> {_begin_foreach=[atable]_} <tr> <td class="col-md-1">{_[atable.count]_}</td> <td class="col-md-3"><a href="#">{_[atable.title]_}</a></td> <td>{_[atable.category_id]_}</td> <td>{_[atable.date]_}</td> <td class="col-md-3"> <a href="#" id="{_[atable.id]_}" class="btn btn-primary edit">Edit</a> <a href="#" id="{_[atable.id]_}" class="btn btn-warning delete">Delete</a> </td> </tr> {_end_foreach=[atable]_} </tbody> </table> </body> </html>'; $fornum = preg_match_all("/\{_begin_foreach=\[(.*)\]_\}([\s\S|\n]*?)\{_end_foreach=\[\1\]_\}/", $patern, $foreach); var_dump($fornum); var_dump($foreach);

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.60.0110.01116.63
8.3.50.0090.01222.06
8.3.40.0070.00718.84
8.3.30.0120.00319.00
8.3.20.0000.00720.29
8.3.10.0070.00021.96
8.3.00.0040.00422.46
8.2.180.0110.01118.66
8.2.170.0100.00322.96
8.2.160.0100.00722.39
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00017.63
8.2.110.0090.00021.30
8.2.100.0090.00317.72
8.2.90.0040.00417.66
8.2.80.0040.00417.97
8.2.70.0090.00017.63
8.2.60.0040.00417.80
8.2.50.0030.00518.07
8.2.40.0040.00421.38
8.2.30.0060.00317.98
8.2.20.0030.00617.67
8.2.10.0080.00018.00
8.2.00.0000.00818.14
8.1.280.0140.00025.92
8.1.270.0150.00020.25
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00422.36
8.1.230.0040.00720.91
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0040.00417.25
8.1.190.0040.00417.35
8.1.180.0050.00318.10
8.1.170.0000.00818.71
8.1.160.0040.00421.87
8.1.150.0040.00418.71
8.1.140.0000.00717.43
8.1.130.0070.00017.55
8.1.120.0070.00017.55
8.1.110.0000.00717.39
8.1.100.0040.00417.55
8.1.90.0060.00317.54
8.1.80.0070.00017.42
8.1.70.0030.00317.42
8.1.60.0040.00417.64
8.1.50.0000.00817.64
8.1.40.0040.00417.48
8.1.30.0060.00317.55
8.1.20.0030.00517.73
8.1.10.0000.00717.63
8.1.00.0000.00917.52
8.0.300.0040.00419.98
8.0.290.0000.00916.63
8.0.280.0040.00418.27
8.0.270.0030.00317.08
8.0.260.0050.00517.20
8.0.250.0000.00716.91
8.0.240.0040.00417.03
8.0.230.0040.00416.91
8.0.220.0040.00417.00
8.0.210.0070.00016.99
8.0.200.0000.01017.06
8.0.190.0000.00716.93
8.0.180.0050.00216.97
8.0.170.0000.00916.87
8.0.160.0040.00417.02
8.0.150.0000.00816.96
8.0.140.0040.00416.87
8.0.130.0050.00013.41
8.0.120.0040.00416.96
8.0.110.0000.00817.00
8.0.100.0000.00716.87
8.0.90.0040.00416.86
8.0.80.0120.00917.01
8.0.70.0040.00417.02
8.0.60.0000.00716.95
8.0.50.0000.00817.00
8.0.30.0070.01517.34
8.0.20.0090.00917.40
8.0.10.0040.00416.88
8.0.00.0090.01116.88
7.4.330.0030.00315.08
7.4.320.0000.00616.79
7.4.300.0030.00316.54
7.4.290.0030.00316.65
7.4.280.0040.00416.69
7.4.270.0030.00316.64
7.4.260.0070.00016.62
7.4.250.0040.00416.66
7.4.240.0030.00416.76
7.4.230.0000.00716.76
7.4.220.0030.01416.68
7.4.210.0130.00716.55
7.4.200.0030.00316.67
7.4.160.0000.01616.68
7.4.150.0070.01017.40
7.4.140.0120.00817.86
7.4.130.0070.01016.62
7.4.120.0060.01216.59
7.4.110.0090.00916.76
7.4.100.0130.00716.51
7.4.90.0110.01116.72
7.4.80.0150.00319.39
7.4.70.0100.00716.64
7.4.60.0140.00316.67
7.4.50.0030.00616.35
7.4.40.0120.01216.44
7.4.30.0090.00916.69
7.4.00.0030.01215.15
7.3.330.0000.00613.13
7.3.320.0030.00413.12
7.3.310.0000.00716.36
7.3.300.0040.00416.20
7.3.290.0080.00716.34
7.3.280.0090.01016.28
7.3.270.0130.00317.40
7.3.260.0110.00516.60
7.3.250.0110.00916.39
7.3.240.0110.01116.31
7.3.230.0150.00716.61
7.3.210.0130.00316.54
7.3.200.0040.01919.39
7.3.190.0060.01316.46
7.3.180.0030.01616.60
7.3.170.0130.00916.30
7.3.160.0120.00916.33
7.2.330.0060.01216.59
7.2.320.0120.00616.81
7.2.310.0090.00916.57
7.2.300.0100.00716.51
7.2.290.0120.00416.61
7.2.60.0000.01617.09
7.2.00.0000.01419.63
7.1.200.0000.01216.04
7.1.100.0000.01218.21
7.1.70.0030.00917.40
7.1.60.0130.01319.12
7.1.50.0070.01017.06
7.1.00.0030.07322.53
7.0.200.0050.00316.99
7.0.60.0030.08319.74
7.0.50.0070.06317.83
7.0.40.0030.08320.21
7.0.30.0430.07020.20
7.0.20.0270.07320.11
7.0.10.0000.09020.05
7.0.00.0000.06720.10
5.6.280.0000.08020.98
5.6.210.0100.07320.54
5.6.200.0000.08018.23
5.6.190.0000.05720.37
5.6.180.2870.04720.51
5.6.170.0300.07720.51
5.6.160.0030.10320.44
5.6.150.0030.07318.16
5.6.140.0130.08018.11
5.6.130.0070.07018.18
5.6.120.0170.07021.11
5.6.110.0130.07020.88
5.6.100.0000.04721.07
5.6.90.0070.07021.12
5.6.80.0000.04020.50
5.6.70.0270.07020.35
5.5.350.0370.06720.44
5.5.340.0070.08017.92
5.5.330.0130.07320.40
5.5.320.0470.06720.32
5.5.310.0200.07020.41
5.5.300.0000.06017.91
5.5.290.0070.04718.02
5.5.280.0070.06020.65
5.5.270.0030.05320.76
5.5.260.0030.08720.67
5.5.250.0100.08320.79
5.5.240.0300.03320.25
5.4.450.0870.05319.44
5.4.440.1000.05719.23
5.4.430.1230.06019.63
5.4.420.0770.05019.62
5.4.410.1070.05719.47
5.4.400.0730.05719.25
5.4.390.0800.05019.15
5.4.380.1100.05019.15
5.4.370.0930.05318.91
5.4.360.0700.06318.91
5.4.350.0700.05718.95
5.4.340.0730.06318.77
5.4.320.0700.06018.91
5.4.310.0770.05318.99
5.4.300.0900.03718.73
5.4.290.0770.05318.93
5.4.280.0730.06018.91
5.4.270.0770.05019.27
5.4.260.1200.06319.27
5.4.250.0730.05319.11
5.4.240.0770.05018.98
5.4.230.0830.05018.77
5.4.220.0900.06718.80
5.4.210.0830.05019.18
5.4.200.0830.04316.83
5.4.190.0870.05019.28
5.4.180.0970.03318.96
5.4.170.1030.04719.16
5.4.160.1000.04319.25
5.4.150.1100.04318.85
5.4.140.0830.04716.40
5.4.130.0770.05316.32
5.4.120.0830.04716.52
5.4.110.0800.04316.23
5.4.100.0870.05716.18
5.4.90.0700.06316.43
5.4.80.0800.04316.41
5.4.70.0970.04716.40
5.4.60.0830.06716.33
5.4.50.0930.05016.47
5.4.40.1030.05716.29
5.4.30.1000.04716.35
5.4.20.1000.05316.20
5.4.10.1030.04316.39
5.4.00.0900.05015.82
5.3.290.0870.06314.72
5.3.280.0930.05314.74
5.3.270.1070.05714.61
5.3.260.1000.05314.68
5.3.250.1070.04314.61
5.3.240.0970.05014.54
5.3.230.0970.05014.56
5.3.220.0730.05314.50
5.3.210.0800.05314.61
5.3.200.0830.04714.46
5.3.190.0830.04714.62
5.3.180.1030.04314.57
5.3.170.0970.06014.71
5.3.160.0970.04714.46
5.3.150.0900.05314.62
5.3.140.1000.04314.48
5.3.130.0900.06314.45
5.3.120.0930.05714.59
5.3.110.0930.06014.55
5.3.100.0970.05314.04
5.3.90.1030.04313.87
5.3.80.0670.06013.91
5.3.70.0700.06013.96
5.3.60.0770.04713.90
5.3.50.0770.04713.85
5.3.40.0830.04313.84
5.3.30.1030.07013.80
5.3.20.0970.04713.73
5.3.10.0830.04313.70
5.3.00.0730.06713.71
5.2.170.0630.04011.14
5.2.160.0600.04311.19
5.2.150.0670.03711.06
5.2.140.0600.04311.07
5.2.130.0630.04011.01
5.2.120.0630.03311.24
5.2.110.0670.03711.02
5.2.100.0670.04011.21
5.2.90.0630.04711.02
5.2.80.0630.04011.31
5.2.70.0730.03310.95
5.2.60.0530.05011.05
5.2.50.0730.04311.02
5.2.40.0530.04010.89
5.2.30.0500.04010.88
5.2.20.0470.04311.04
5.2.10.0470.04010.79
5.2.00.0470.04710.57
5.1.60.0600.0409.91
5.1.50.0570.04010.08
5.1.40.0670.0309.89
5.1.30.0700.03010.27
5.1.20.0630.03710.25
5.1.10.0700.0309.96
5.1.00.0670.03710.23
5.0.50.0400.0338.56
5.0.40.0300.0308.49
5.0.30.0330.0438.38
5.0.20.0300.0308.17
5.0.10.0300.0308.09
5.0.00.0270.0478.08
4.4.90.0370.0205.91
4.4.80.0270.0235.87
4.4.70.0330.0205.86
4.4.60.0270.0235.84
4.4.50.0330.0275.80
4.4.40.0370.0305.82
4.4.30.0300.0235.81
4.4.20.0300.0235.83
4.4.10.0370.0175.86
4.4.00.0330.0305.80
4.3.110.0300.0235.74
4.3.100.0430.0105.73
4.3.90.0300.0205.74
4.3.80.0270.0375.73
4.3.70.0370.0135.70
4.3.60.0300.0205.75
4.3.50.0330.0205.69
4.3.40.0270.0375.72
4.3.30.0130.0204.50
4.3.20.0200.0234.47
4.3.10.0170.0234.48
4.3.00.0370.0277.13

preferences:
46.78 ms | 401 KiB | 5 Q