3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = 'dog.cat' . str_repeat('.dog.cat', 815); for ($i = 0; $i < 5; ++$i) { $txt .= '.dog.cat'; echo count(explode('.', $txt)) . "\n"; echo strlen($txt) . "\n"; if (preg_match("/[a-z]+(?:\.[a-z]+)*/i", $txt, $match)) { echo "A match was found." . strlen($match[0]); } else { echo "A match was not found."; } echo "\n---\n"; }

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.0180.00617.00
8.3.50.0190.00316.92
8.3.40.0130.00319.21
8.3.30.0070.00719.19
8.3.20.0000.00924.18
8.3.10.0040.00424.66
8.3.00.0090.00026.16
8.2.180.0180.00025.92
8.2.170.0040.01119.20
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00826.16
8.2.110.0060.00622.29
8.2.100.0030.00619.11
8.1.280.0040.01525.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0070.00418.75
8.1.230.0030.00622.47
7.2.00.0050.00318.67

preferences:
46.46 ms | 400 KiB | 5 Q