3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument( '1.0', 'UTF-8' ); $doc->loadHTML( '<?xml encoding="utf-8" ?><p><p><p><p><p>five<p><p><p><p><p>ten' ); $body = $doc->documentElement->childNodes[0]; $start = hrtime( true ); for ( $i = 0; $i < 1_000_000; $i++ ) $dummy = $body->childNodes->item( 4 ); $stop = hrtime( true ); $seconds = ( $stop - $start ) / 1_000_000_000; echo "$seconds s" . PHP_EOL; $start = hrtime( true ); for ( $i = 0; $i < 1_000_000; $i++ ) $dummy = $body->childNodes[4]; $stop = hrtime( true ); $seconds = ( $stop - $start ) / 1_000_000_000; echo "$seconds s" . PHP_EOL;

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.00.0140.17220.22
8.4.150.0030.00014.05
8.4.140.0120.17517.73
8.4.130.0130.13617.76
8.4.120.0080.10920.96
8.4.110.0100.11519.04
8.4.100.0050.12318.18
8.4.90.0040.10817.82
8.4.80.0110.12418.13
8.4.70.0440.11518.18
8.4.60.0210.10618.18
8.4.50.0200.10918.24
8.4.40.0300.11718.18
8.4.30.0170.11118.18
8.4.20.0250.11118.18
8.4.10.0200.11818.18
8.3.280.0030.00014.05
8.3.270.0100.17716.90
8.3.260.0060.10316.68
8.3.250.0070.11319.04
8.3.240.0100.12516.68
8.3.230.0110.12116.90
8.3.220.0100.11816.95
8.3.210.0250.10218.18
8.3.200.0400.11218.18
8.3.190.0190.10118.18
8.3.180.0180.10718.18
8.3.170.0240.10318.18
8.3.160.0340.10618.18
8.3.150.0210.11118.18
8.3.140.0220.09718.18
8.3.130.0160.10218.18
8.3.120.0170.10418.18
8.3.110.0160.09918.18
8.3.100.0160.10018.18
8.3.90.0200.09818.18
8.3.80.0270.09818.18
8.3.70.0200.09718.18
8.3.60.0390.11018.18
8.3.50.0240.09518.18
8.3.40.0420.11418.18
8.3.30.0190.10218.18
8.3.20.0300.11118.18
8.3.10.0260.11518.18
8.3.00.0150.10418.18
8.2.290.0080.10219.20
8.2.280.0140.10318.18
8.2.270.0310.09818.18
8.2.260.0220.10118.18
8.2.250.0150.09818.18
8.2.240.0120.10118.18
8.2.230.0150.09718.18
8.2.220.0250.10018.18
8.2.210.0150.09918.18
8.2.200.0160.10918.18
8.2.190.0120.10018.18
8.2.180.0160.10118.18
8.2.170.0310.11718.18
8.2.160.0260.11918.18
8.2.150.0160.10118.18
8.2.140.0160.10018.18
8.2.130.0190.10418.18
8.2.120.0220.09818.18
8.2.110.0330.12418.18
8.2.100.0160.09718.18
8.2.90.0320.11018.18
8.2.80.0390.11118.18
8.2.70.0280.17418.18
8.2.60.0290.14618.18
8.2.50.0190.17118.18
8.2.40.0150.15919.68
8.2.30.0230.14718.18
8.2.20.0150.14518.18
8.2.10.0210.14918.18
8.2.00.0130.15218.18

preferences:
35.33 ms | 403 KiB | 5 Q