3v4l.org

run code in 500+ PHP versions simultaneously
<?php function __( $string ) { return $string; } class AtomParser { var $FILE = "php://input"; var $debug = false; public function parse() { $fp = fopen($this->FILE, "r"); if (false === $fp) { return false; } while ($data = fread($fp, 4096)) { if($this->debug) $this->content .= $data; if(!xml_parse($parser, $data, feof($fp))) { /* translators: 1: Error message, 2: Line number. */ trigger_error(sprintf(__('XML Error: %1$s at line %2$s')."\n", xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser))); $ret = false; break; } } fclose($fp); } } $atom_parser = new AtomParser(); $atom_parser->FILE = "/usr/local/something.txt"; $atom_parser->parse();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pYKdD
function name:  (null)
number of ops:  8
compiled vars:  !0 = $atom_parser
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   33     0  E >   NEW                                                  $1      'AtomParser'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   35     3        ASSIGN_OBJ                                                   !0, 'FILE'
          4        OP_DATA                                                      '%2Fusr%2Flocal%2Fsomething.txt'
   36     5        INIT_METHOD_CALL                                             !0, 'parse'
          6        DO_FCALL                                          0          
          7      > RETURN                                                       1

Function __:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pYKdD
function name:  __
number of ops:  3
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1      > RETURN                                                       !0
    5     2*     > RETURN                                                       null

End of function __

Class AtomParser:
Function parse:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 10
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 47
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
Branch analysis from position: 47
Branch analysis from position: 14
filename:       /in/pYKdD
function name:  parse
number of ops:  57
compiled vars:  !0 = $fp, !1 = $data, !2 = $parser, !3 = $ret
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                                   'fopen'
          1        FETCH_OBJ_R                                          ~4      'FILE'
          2        SEND_VAL                                                     ~4
          3        SEND_VAL                                                     'r'
          4        DO_ICALL                                             $5      
          5        ASSIGN                                                       !0, $5
   13     6        TYPE_CHECK                                        4          !0
          7      > JMPZ                                                         ~7, ->9
   14     8    > > RETURN                                                       <false>
   17     9    > > JMP                                                          ->47
   18    10    >   FETCH_OBJ_R                                          ~8      'debug'
         11      > JMPZ                                                         ~8, ->14
         12    >   ASSIGN_OBJ_OP                                     8          'content'
         13        OP_DATA                                                      !1
   20    14    >   INIT_FCALL                                                   'xml_parse'
         15        SEND_VAR                                                     !2
         16        SEND_VAR                                                     !1
         17        INIT_FCALL                                                   'feof'
         18        SEND_VAR                                                     !0
         19        DO_ICALL                                             $10     
         20        SEND_VAR                                                     $10
         21        DO_ICALL                                             $11     
         22        BOOL_NOT                                             ~12     $11
         23      > JMPZ                                                         ~12, ->47
   22    24    >   INIT_FCALL                                                   'trigger_error'
         25        INIT_FCALL                                                   'sprintf'
         26        INIT_FCALL                                                   '__'
         27        SEND_VAL                                                     'XML+Error%3A+%251%24s+at+line+%252%24s'
         28        DO_FCALL                                          0  $13     
         29        CONCAT                                               ~14     $13, '%0A'
         30        SEND_VAL                                                     ~14
   23    31        INIT_FCALL                                                   'xml_error_string'
         32        INIT_FCALL                                                   'xml_get_error_code'
         33        SEND_VAR                                                     !2
         34        DO_ICALL                                             $15     
         35        SEND_VAR                                                     $15
         36        DO_ICALL                                             $16     
         37        SEND_VAR                                                     $16
   24    38        INIT_FCALL                                                   'xml_get_current_line_number'
         39        SEND_VAR                                                     !2
         40        DO_ICALL                                             $17     
         41        SEND_VAR                                                     $17
   22    42        DO_ICALL                                             $18     
   24    43        SEND_VAR                                                     $18
   22    44        DO_ICALL                                                     
   25    45        ASSIGN                                                       !3, <false>
   26    46      > JMP                                                          ->53
   17    47    >   INIT_FCALL                                                   'fread'
         48        SEND_VAR                                                     !0
         49        SEND_VAL                                                     4096
         50        DO_ICALL                                             $21     
         51        ASSIGN                                               ~22     !1, $21
         52      > JMPNZ                                                        ~22, ->10
   29    53    >   INIT_FCALL                                                   'fclose'
         54        SEND_VAR                                                     !0
         55        DO_ICALL                                                     
   30    56      > RETURN                                                       null

End of function parse

End of class AtomParser.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
250.14 ms | 2193 KiB | 23 Q