3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t ='<body> <item>abc</item> <item>def</item> unparsable rest </body>'; $filtered = array_filter(explode("\n", $t), function($line) { $line = trim($line); return $line[0] == '<' && substr($line, -1) == '>'; }); $result = implode("\n", $filtered); echo $result;

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.110.0030.00620.94
8.3.100.0030.00624.06
8.3.90.0000.00726.77
8.3.80.0060.00319.36
8.3.70.0070.00716.50
8.3.60.0040.01118.30
8.3.50.0120.00523.71
8.3.40.0150.00018.63
8.3.30.0100.00718.86
8.3.20.0030.00620.95
8.3.10.0040.00422.05
8.3.00.0070.00023.52
8.2.230.0000.00922.58
8.2.220.0090.00637.54
8.2.210.0090.00626.77
8.2.200.0040.00818.88
8.2.190.0120.00918.29
8.2.180.0140.00716.88
8.2.170.0100.01022.96
8.2.160.0040.01120.39
8.2.150.0080.00024.18
8.2.140.0000.00924.66
8.2.130.0040.00426.16
8.2.120.0050.00319.48
8.2.110.0030.00620.48
8.2.100.0080.00317.91
8.2.90.0090.00017.78
8.2.80.0000.00819.34
8.2.70.0000.00917.50
8.2.60.0030.00618.03
8.2.50.0030.00718.07
8.2.40.0040.00418.16
8.2.30.0040.00418.20
8.2.20.0000.00718.01
8.2.10.0000.00719.32
8.2.00.0040.00419.43
8.1.290.0050.00530.84
8.1.280.0130.00325.92
8.1.270.0080.00022.14
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0080.00022.01
8.1.230.0090.00322.80
8.1.220.0040.00417.77
8.1.210.0000.00818.89
8.1.200.0030.00617.35
8.1.190.0030.00617.35
8.1.180.0050.00318.10
8.1.170.0080.00018.51
8.1.160.0080.00018.95
8.1.150.0000.00818.91
8.1.140.0000.00720.69
8.1.130.0030.00317.38
8.1.120.0000.00817.49
8.1.110.0030.00517.36
8.1.100.0000.00817.37
8.1.90.0030.00317.37
8.1.80.0000.00717.51
8.1.70.0000.00717.47
8.1.60.0070.00017.48
8.1.50.0050.00317.43
8.1.40.0030.00517.35
8.1.30.0000.00717.67
8.1.20.0080.00017.66
8.1.10.0040.00417.55
8.1.00.0040.00417.54
8.0.300.0000.00720.16
8.0.290.0080.00016.63
8.0.280.0050.00218.45
8.0.270.0000.00817.89
8.0.260.0000.00716.82
8.0.250.0070.00016.91
8.0.240.0030.00316.98
8.0.230.0030.00316.86
8.0.220.0070.00016.84
8.0.210.0030.00316.89
8.0.200.0030.00316.85
8.0.190.0040.00416.80
8.0.180.0040.00416.91
8.0.170.0000.00916.94
8.0.160.0000.00716.89
8.0.150.0000.00716.86
8.0.140.0000.00716.91
8.0.130.0000.00613.32
8.0.120.0040.00416.90
8.0.110.0040.00416.90
8.0.100.0000.00716.79
8.0.90.0080.00016.88
8.0.80.0130.00616.89
8.0.70.0040.00416.75
8.0.60.0000.00816.95
8.0.50.0070.00016.74
8.0.30.0160.00017.16
8.0.20.0130.00617.14
8.0.10.0070.00016.89
8.0.00.0040.01516.71
7.4.330.0000.00615.55
7.4.320.0000.00616.62
7.4.300.0040.00416.61
7.4.290.0050.00316.41
7.4.280.0040.00416.43
7.4.270.0030.00316.64
7.4.260.0050.00013.30
7.4.250.0030.00516.46
7.4.240.0020.00516.52
7.4.230.0050.00216.61
7.4.220.0020.00516.63
7.4.210.0100.00716.66
7.4.200.0030.00316.42
7.4.130.0130.00716.38
7.4.120.0100.01016.38
7.4.110.0100.00716.42
7.4.100.0060.01116.48
7.4.90.0100.00716.68
7.4.80.0090.01019.39
7.4.70.0090.00616.66
7.4.60.0100.00716.41
7.4.50.0120.00416.31
7.4.40.0060.00916.65
7.4.20.0130.00516.48
7.4.10.0070.00716.32
7.4.00.0060.00916.41
7.3.330.0030.00516.42
7.3.320.0030.00313.34
7.3.310.0030.00316.38
7.3.300.0070.00016.38
7.3.290.0070.00916.29
7.3.280.0270.00416.32
7.3.260.0070.01116.32
7.3.240.0120.00816.49
7.3.230.0140.01016.32
7.3.210.0030.01316.43
7.3.200.0070.01016.32
7.3.190.0120.00616.36
7.3.180.0090.01416.38
7.3.170.0120.00616.68
7.3.160.0140.00516.38
7.3.130.0060.00916.40
7.3.120.0000.01916.41
7.3.110.0000.01516.49
7.3.100.0000.01516.62
7.3.90.0060.01016.67
7.3.80.0070.01016.45
7.3.70.0060.00916.37
7.3.60.0030.01616.22
7.3.50.0040.01116.44
7.3.40.0090.00616.45
7.3.30.0090.00616.34
7.3.20.0130.00316.45
7.3.10.0110.01116.44
7.3.00.0100.00716.57
7.2.330.0070.01016.82
7.2.320.0110.00616.72
7.2.310.0110.00616.58
7.2.300.0100.00716.43
7.2.290.0000.01716.73
7.2.260.0080.00816.70
7.2.250.0060.01016.42
7.2.240.0080.00716.52
7.2.230.0130.00316.51
7.2.220.0030.01616.53
7.2.210.0040.01216.46
7.2.200.0110.00916.59
7.2.190.0060.01216.77
7.2.180.0040.01116.45
7.2.170.0000.01916.39
7.2.160.0090.00616.55
7.2.150.0100.00716.52
7.2.140.0130.00916.59
7.2.130.0130.00316.63
7.2.120.0060.00916.50
7.2.110.0090.00916.52
7.2.100.0030.01316.68
7.2.90.0060.01016.57
7.2.80.0070.01316.74
7.2.70.0030.01316.57
7.2.60.0080.00816.50
7.2.50.0030.01216.62
7.2.40.0070.01016.55
7.2.30.0100.00716.61
7.2.20.0030.01516.73
7.2.10.0030.01416.56
7.2.00.0000.01616.66

preferences:
51.96 ms | 403 KiB | 5 Q