3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { protected $emailLog; public function initialize() { $this->emailLog = new ArrayObject([1, 2, 3]); } public function summary() { return count($this->emailLog) === 0 ? '' : count($this->emailLog); } } $log = new Foo; $log->initialize(); echo $log->summary(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OZQGr
function name:  (null)
number of ops:  9
compiled vars:  !0 = $log
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   NEW                                                  $1      'Foo'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   18     3        INIT_METHOD_CALL                                             !0, 'initialize'
          4        DO_FCALL                                          0          
   19     5        INIT_METHOD_CALL                                             !0, 'summary'
          6        DO_FCALL                                          0  $5      
          7        ECHO                                                         $5
   20     8      > RETURN                                                       1

Class Foo:
Function initialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OZQGr
function name:  initialize
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   NEW                                                  $1      'ArrayObject'
          1        SEND_VAL_EX                                                  <array>
          2        DO_FCALL                                          0          
          3        ASSIGN_OBJ                                                   'emailLog'
          4        OP_DATA                                                      $1
    8     5      > RETURN                                                       null

End of function initialize

Function summary:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OZQGr
function name:  summary
number of ops:  11
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                          ~0      'emailLog'
          1        COUNT                                                ~1      ~0
          2        IS_IDENTICAL                                                 ~1, 0
          3      > JMPZ                                                         ~2, ->6
   12     4    >   QM_ASSIGN                                            ~3      ''
          5      > JMP                                                          ->9
   13     6    >   FETCH_OBJ_R                                          ~4      'emailLog'
          7        COUNT                                                ~5      ~4
          8        QM_ASSIGN                                            ~3      ~5
          9    > > RETURN                                                       ~3
   14    10*     > RETURN                                                       null

End of function summary

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.9 ms | 1595 KiB | 8 Q