3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Testing { private $value = 0; public function incrementBy1() { $this->value ++; if (rand(1, 9)) { return null; } return $this; } public function output() { echo "value: " . $this->value; } } $test = new Testing; $test->incrementBy1()->incrementBy1()->incrementBy1()->output();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NiZoZ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'Testing'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_METHOD_CALL                                         !0, 'incrementBy1'
          4        DO_FCALL                                      0  $4      
          5        INIT_METHOD_CALL                                         $4, 'incrementBy1'
          6        DO_FCALL                                      0  $5      
          7        INIT_METHOD_CALL                                         $5, 'incrementBy1'
          8        DO_FCALL                                      0  $6      
          9        INIT_METHOD_CALL                                         $6, 'output'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Testing:
Function incrementby1:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NiZoZ
function name:  incrementBy1
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   PRE_INC_OBJ                                              'value'
    9     1        INIT_FCALL                                               'rand'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 9
          4        DO_ICALL                                         $1      
          5      > JMPZ                                                     $1, ->7
   10     6    > > RETURN                                                   null
   13     7    >   FETCH_THIS                                       ~2      
          8      > RETURN                                                   ~2
   14     9*     > RETURN                                                   null

End of function incrementby1

Function output:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NiZoZ
function name:  output
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1        CONCAT                                           ~1      'value%3A+', ~0
          2        ECHO                                                     ~1
   18     3      > RETURN                                                   null

End of function output

End of class Testing.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.84 ms | 1396 KiB | 15 Q