3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 'assert(class_exists(\'\\DOMDocument\'));$doc = new DOMDocument();$doc->loadHtml(\'<html><head><meta charset="UTF-8"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body id="app">Hello</body></html>\');assert($doc->getElementById(\'app\')->nodeValue === \'Hello\');'; var_dump($test); var_dump(escapeshellarg($test)); var_dump(escapeshellcmd($test)); var_dump(str_replace(['"', '$'], ['\"', '\$'], $test));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/58omP
function name:  (null)
number of ops:  25
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'assert%28class_exists%28%27%5CDOMDocument%27%29%29%3B%24doc+%3D+new+DOMDocument%28%29%3B%24doc-%3EloadHtml%28%27%3Chtml%3E%3Chead%3E%3Cmeta+charset%3D%22UTF-8%22%3E%3Cmeta+http-equiv%3D%22Content-Type%22+content%3D%22text%2Fhtml%3B+charset%3DUTF-8%22%3E%3C%2Fhead%3E%3Cbody+id%3D%22app%22%3EHello%3C%2Fbody%3E%3C%2Fhtml%3E%27%29%3Bassert%28%24doc-%3EgetElementById%28%27app%27%29-%3EnodeValue+%3D%3D%3D+%27Hello%27%29%3B'
    5     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    6     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'escapeshellarg'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
    7    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'escapeshellcmd'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                                 
    8    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'str_replace'
         18        SEND_VAL                                                 <array>
         19        SEND_VAL                                                 <array>
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $7      
         22        SEND_VAR                                                 $7
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
206.53 ms | 1091 KiB | 17 Q