3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = ' <div class="temp"> [title type="text" tag="h2" value="This is my cool title" disabled some-attribute] [text type="text" tag="p" value="Lorem ipsum dolor sit amet"] </div> '; preg_match_all('/\[(.*?)\]/', $html, $matches); $result = []; foreach ($matches[1] as $match) { $id = strtok($match, ' '); $tag = ['id' => $id]; while ($token = strtok(' ')) { if (str_contains($token, '=')) { [$key, $value] = explode('=', $token); if (str_ends_with($token, '"')) { $tag[$key] = trim($value, '"'); continue; } $value2 = strtok('"'); $tag[$key] = trim("$value $value2", '"'); continue; } $tag[$token] = true; } $result[] = $tag; } print_r($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.5.20.0090.00818.61
8.5.10.0110.01218.48
8.5.00.0100.01120.17
8.4.170.0150.00622.16
8.4.160.0140.00823.95
8.4.150.0020.00014.05
8.4.140.0140.00717.81
8.4.130.0090.01017.86
8.4.120.0100.01024.10
8.4.110.0140.00622.64
8.4.100.0110.01118.07
8.4.90.0110.00818.69
8.4.80.0150.00519.96
8.4.70.0100.01018.18
8.4.60.0050.00520.64
8.4.50.0060.00622.38
8.4.40.0060.00317.71
8.4.30.0130.00320.61
8.4.20.0130.00718.04
8.4.10.0050.00519.57
8.3.290.0060.00418.61
8.3.280.0110.00918.58
8.3.270.0110.01016.93
8.3.260.0100.00716.93
8.3.250.0130.00719.02
8.3.240.0080.01117.13
8.3.230.0080.00416.98
8.3.220.0130.00817.18
8.3.210.0050.00316.88
8.3.200.0070.00216.61
8.3.190.0110.00817.06
8.3.180.0070.00816.87
8.3.170.0120.00617.20
8.3.160.0110.00716.53
8.3.150.0110.00720.86
8.3.140.0030.00618.40
8.3.130.0000.00816.73
8.3.120.0040.00419.22
8.3.110.0060.00920.94
8.3.100.0030.00624.06
8.3.90.0040.00426.77
8.3.80.0040.00417.97
8.3.70.0100.00616.75
8.3.60.0110.01118.68
8.3.50.0130.00917.00
8.3.40.0100.01020.21
8.3.30.0030.01019.30
8.3.20.0040.00424.18
8.3.10.0070.00024.66
8.3.00.0000.00826.16
8.2.300.0140.01018.25
8.2.290.0120.00620.48
8.2.280.0100.00818.47
8.2.270.0150.00317.23
8.2.260.0080.00020.55
8.2.250.0120.00418.59
8.2.240.0060.00317.41
8.2.230.0030.00622.58
8.2.220.0150.00637.54
8.2.210.0090.00926.77
8.2.200.0050.00516.63
8.2.190.0100.00718.40
8.2.180.0150.00616.63
8.2.170.0110.00418.97
8.2.160.0030.01022.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00321.25
8.2.110.0110.00021.12
8.2.100.0310.00418.44
8.2.90.0210.01018.44
8.2.80.0240.00618.44
8.2.70.0260.00518.44
8.2.60.0280.00318.44
8.2.50.0250.00718.44
8.2.40.0200.00119.03
8.2.30.0200.00818.44
8.2.20.0210.00718.44
8.2.10.0200.01018.44
8.2.00.0240.00518.44
8.1.340.0100.01019.42
8.1.330.0080.00722.17
8.1.320.0200.00316.25
8.1.310.0030.00618.36
8.1.300.0030.00618.19
8.1.290.0000.01030.84
8.1.280.0030.01425.92
8.1.270.0090.00020.73
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00521.11
8.1.230.0130.00519.05
8.1.220.0240.00618.44
8.1.210.0280.00318.44
8.1.200.0230.00818.44
8.1.190.0230.00718.44
8.1.180.0240.00718.44
8.1.170.0220.00518.44
8.1.160.0210.00618.44
8.1.150.0200.00818.44
8.1.140.0220.00818.44
8.1.130.0220.00518.44
8.1.120.0250.00318.44
8.1.110.0180.01018.44
8.1.100.0260.00318.44
8.1.90.0230.00518.44
8.1.80.0210.00618.44
8.1.70.0210.00718.44
8.1.60.0250.00618.44
8.1.50.0280.00218.44
8.1.40.0240.00718.44
8.1.30.0290.00318.44
8.1.20.0300.00518.44
8.1.10.0260.00418.44
8.1.00.0250.00018.44
8.0.300.0240.00218.44
8.0.290.0240.00518.44
8.0.280.0250.00618.44
8.0.270.0260.00318.44
8.0.260.0190.00818.44
8.0.250.0230.00518.44
8.0.240.0280.00018.44
8.0.230.0250.00518.44
8.0.220.0250.00318.44
8.0.210.0190.00718.44
8.0.200.0210.00618.44
8.0.190.0210.00718.44
8.0.180.0200.00818.44
8.0.170.0230.00418.44
8.0.160.0240.00318.44
8.0.150.0200.00818.44
8.0.140.0230.00518.44
8.0.130.0230.00318.44
8.0.120.0190.00718.44
8.0.110.0220.00618.44
8.0.100.0260.00318.44
8.0.90.0240.00518.44
8.0.80.0210.00818.44
8.0.70.0240.00518.44
8.0.60.0200.00618.44
8.0.50.0220.00318.44
8.0.30.0230.00418.44
8.0.20.0250.00418.44
8.0.10.0240.00518.44

preferences:
38.35 ms | 403 KiB | 5 Q