3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo LIBXML_DOTTED_VERSION.' '; $s2 = '<?xml version="1.0"?><!DOCTYPE kaboom [ <!ENTITY a "'.str_repeat('a', 100000).'"> ]> <kaboom>'.str_repeat('&a;', 500).'</kaboom>'; $doc = new DOMDocument(); $doc->loadXML($s2); echo strlen($doc->lastChild->nodeValue);
Output for 8.2.18, 8.3.5 - 8.3.6
2.9.4 Fatal error: Out of memory (allocated 2097152 bytes) (tried to allocate 50000032 bytes) in /in/9Ph6V on line 12 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for 8.1.2 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
2.9.4 Warning: main(): Memory allocation failed : growing buffer in /in/9Ph6V on line 12 Warning: main(): Memory allocation failed : growing buffer in /in/9Ph6V on line 12 Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /in/9Ph6V on line 12 0
Output for 7.3.24 - 7.3.31, 7.4.12 - 7.4.32, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.1, 8.1.28
2.9.4 Fatal error: Out of memory (allocated 2097152) (tried to allocate 50000032 bytes) in /in/9Ph6V on line 12 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for 5.6.28, 7.0.14 - 7.0.20, 7.1.0 - 7.1.7, 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.23, 7.3.32 - 7.3.33, 7.4.0 - 7.4.11, 7.4.33, 8.0.13
2.9.4 50000000
Output for 7.2.0
2.9.7 50000000
Output for 7.1.10
2.9.5 50000000
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.15, 5.6.17 - 5.6.21, 7.0.1 - 7.0.6
2.9.3 50000000
Output for 5.4.35 - 5.4.45, 5.6.16, 7.0.0
2.9.2 50000000
Output for 5.3.25 - 5.3.29, 5.4.16 - 5.4.34
2.9.1 50000000
Output for 5.3.15 - 5.3.24, 5.4.5 - 5.4.15
2.8.0 50000000
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.14, 5.4.0 - 5.4.4
2.7.8 50000000
Output for 5.0.0 - 5.0.5
Notice: Use of undefined constant LIBXML_DOTTED_VERSION - assumed 'LIBXML_DOTTED_VERSION' in /in/9Ph6V on line 3 LIBXML_DOTTED_VERSION 50000000
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Notice: Use of undefined constant LIBXML_DOTTED_VERSION - assumed 'LIBXML_DOTTED_VERSION' in /in/9Ph6V on line 3 LIBXML_DOTTED_VERSION Fatal error: Cannot instantiate non-existent class: domdocument in /in/9Ph6V on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant LIBXML_DOTTED_VERSION - assumed 'LIBXML_DOTTED_VERSION' in /in/9Ph6V on line 3 LIBXML_DOTTED_VERSION Fatal error: Cannot instantiate non-existent class: domdocument in /in/9Ph6V on line 10

preferences:
229.98 ms | 401 KiB | 312 Q