3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $fileHandles = []; public $files = []; public function baz() { $offset = 15; $this->files[$offset] = tempnam(); if (false === $file || false === $this->fileHandles[$offset] = fopen($this->files[$offset], 'rb')) { throw new RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable'); } } } $foo = new Foo; $foo->baz(); function set($param) { if ($param > 10) { return $param; } return false; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fdZtr
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        INIT_METHOD_CALL                                         !0, 'baz'
          4        DO_FCALL                                      0          
   30     5      > RETURN                                                   1

Function set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fdZtr
function name:  set
number of ops:  6
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
   25     1        IS_SMALLER                                               10, !0
          2      > JMPZ                                                     ~1, ->4
   26     3    > > RETURN                                                   !0
   29     4    > > RETURN                                                   <false>
   30     5*     > RETURN                                                   null

End of function set

Class Foo:
Function baz:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 19
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/fdZtr
function name:  baz
number of ops:  25
compiled vars:  !0 = $offset, !1 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 15
   12     1        INIT_FCALL                                               'tempnam'
          2        DO_ICALL                                         $5      
          3        FETCH_OBJ_W                                      $3      'files'
          4        ASSIGN_DIM                                               $3, !0
          5        OP_DATA                                                  $5
   14     6        TYPE_CHECK                                    4  ~6      !1
          7      > JMPNZ_EX                                         ~6      ~6, ->19
          8    >   INIT_FCALL                                               'fopen'
          9        FETCH_OBJ_R                                      ~9      'files'
         10        FETCH_DIM_R                                      ~10     ~9, !0
         11        SEND_VAL                                                 ~10
         12        SEND_VAL                                                 'rb'
         13        DO_ICALL                                         $11     
         14        FETCH_OBJ_W                                      $7      'fileHandles'
         15        ASSIGN_DIM                                       ~8      $7, !0
         16        OP_DATA                                                  $11
         17        TYPE_CHECK                                    4  ~12     ~8
         18        BOOL                                             ~6      ~12
         19    > > JMPZ                                                     ~6, ->24
   15    20    >   NEW                                              $13     'RuntimeException'
         21        SEND_VAL_EX                                              'A+temporary+file+could+not+be+opened+to+write+the+process+output+to%2C+verify+that+your+TEMP+environment+variable+is+writable'
         22        DO_FCALL                                      0          
         23      > THROW                                         0          $13
   17    24    > > RETURN                                                   null

End of function baz

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.97 ms | 1400 KiB | 17 Q