3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<'XML' <AIUTO><BASE_GIURIDICA_NAZIONALE>Quadro riepilogativo delle misure a sostegno delle imprese attive nei settori agricolo, forestale, della pesca e acquacoltura ai sensi della Comunicazione della Commissione europea C (2020) 1863 final – “Quadro temporaneo per le misure di aiuto di Stato a sostegno dell’economia nell’attuale emergenza del COVID&#2;19” e successive modifiche e integrazioni</BASE_GIURIDICA_NAZIONALE></AIUTO> XML; class fix_entities_filter extends php_user_filter { function filter($in, $out, &$consumed, bool $closing): int { while ($bucket = stream_bucket_make_writeable($in)) { $bucket->data = $this->fix($bucket->data); $consumed += $bucket->datalen; stream_bucket_append($out, $bucket); } return PSFS_PASS_ON; } function fix($data) { return strtr($data, ['&#2;' => '&#x202f;']); } } stream_filter_register("fix_entities", "fix_entities_filter") or die("Failed to register filter"); $fileNamePath = "php://filter/read=fix_entities/resource=data:text/plain;base64," . base64_encode($xml); $reader = new XMLReader(); if (!$reader->open($fileNamePath)) { echo "Error opening file: $fileNamePath", PHP_EOL; } echo "Processing XML", PHP_EOL; while ($reader->read()) { if ($reader->nodeType == XMLReader::ELEMENT && $reader->name == 'AIUTO') { try { $input = $reader->readOuterXML(); $nodeAiuto = new SimpleXMLElement($input); var_dump($nodeAiuto); } catch(Exception $e) { echo "Error Node AIUTO ", $e->getMessage(), PHP_EOL; continue; } //Do stuff here } } $reader->close();

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.10.0120.00520.01
8.5.00.0150.00820.19
8.4.150.0020.00114.05
8.4.140.0090.01418.14
8.4.130.0130.00719.23
8.4.120.0030.00624.35
8.4.110.0060.00319.42
8.4.100.0090.01119.22
8.4.90.0090.01221.13
8.4.80.0110.00819.35
8.4.70.0120.00819.41
8.4.60.0070.01519.38
8.4.50.0130.00320.91
8.4.40.0070.00418.00
8.4.30.0060.01220.89
8.4.20.0060.01618.03
8.4.10.0070.01024.10
8.3.280.0120.00818.83
8.3.270.0140.00816.99
8.3.260.0110.00916.86
8.3.250.0060.00619.13
8.3.240.0100.01017.35
8.3.230.0130.00716.80
8.3.220.0050.00219.41
8.3.210.0080.00816.97
8.3.200.0050.00516.94
8.3.190.0100.00917.83
8.3.180.0110.00819.47
8.3.170.0070.01119.34
8.3.160.0160.00317.50
8.3.150.0090.00916.94
8.3.140.0000.00819.12
8.3.130.0060.00318.64
8.3.120.0030.00721.02
8.3.110.0070.00320.94
8.3.100.0120.00318.83
8.3.90.0040.00426.77
8.3.80.0080.00418.81
8.3.70.0150.00416.96
8.3.60.0120.00317.00
8.3.50.0080.00816.86
8.3.40.0110.00720.71
8.3.30.0040.01120.58
8.3.20.0050.00324.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0080.01120.96
8.2.280.0070.00118.63
8.2.270.0110.00016.85
8.2.260.0080.00016.96
8.2.250.0060.00317.02
8.2.240.0090.00619.18
8.2.230.0090.00022.58
8.2.220.0100.00724.06
8.2.210.0120.00626.77
8.2.200.0030.01018.79
8.2.190.0120.00917.13
8.2.180.0150.00017.00
8.2.170.0070.00719.44
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0040.00421.53
8.2.110.0040.00722.57
8.2.100.0030.00620.85
8.2.70.0200.00179.33
8.1.330.0120.00822.43
8.1.320.0110.00818.41
8.1.310.0100.00016.64
8.1.300.0040.01120.65
8.1.290.0070.00330.84
8.1.280.0110.01125.92
8.1.270.0040.00424.66
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00720.59
8.1.230.0070.00319.10
7.4.280.0140.00179.33
7.4.00.0050.00679.33
7.2.270.0120.00379.33
7.0.80.0110.01117.03

preferences:
27.79 ms | 403 KiB | 5 Q