3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $html=<<<END <div class="resultFound"> <font class="orangebold">110</font> Properties Found </div> END; $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXPath($doc); $fonts = $xpath->query('//div[@class="resultFound"]/font[@class="orangebold"]'); //foreach($fonts as $font) { echo $font->item(0)->textContent. "\n"; } ?>
Output for 7.0.5 - 7.1.0
Notice: Undefined variable: font in /in/8edNW on line 14 Fatal error: Uncaught Error: Call to a member function item() on null in /in/8edNW:14 Stack trace: #0 {main} thrown in /in/8edNW on line 14
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: font in /in/8edNW on line 14 Fatal error: Uncaught Error: Call to a member function item() on unknown in /in/8edNW:14 Stack trace: #0 {main} thrown in /in/8edNW on line 14
Process exited with code 255.
Output for 5.6.7 - 5.6.28
Notice: Undefined variable: font in /in/8edNW on line 14 Fatal error: Call to a member function item() on null in /in/8edNW on line 14
Process exited with code 255.
Output for 5.0.4 - 5.1.1, 5.1.3 - 5.5.35
Notice: Undefined variable: font in /in/8edNW on line 14 Fatal error: Call to a member function item() on a non-object in /in/8edNW on line 14
Process exited with code 255.
Output for 5.1.2
Notice: Undefined variable: font in /in/8edNW on line 15 Fatal error: Call to a member function item() on a non-object in /in/8edNW on line 15
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: font in /in/8edNW on line 14 Fatal error: Call to a member function item() on a non-object in /in/8edNW on line 14
Process exited with code 255.
Output for 4.4.3 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/8edNW on line 14
Process exited with code 255.
Output for 4.4.2
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/8edNW on line 15
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/8edNW on line 14
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `','' or `';'' in /in/8edNW on line 14
Process exited with code 255.