3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $a = "foo", $b = null, $c = null, $d = "bar", $e = null; public function echoAllProperties() { foreach ($this as $key=>$value) { if (!empty($value)) echo $key." => ".$value."\n"; } } } $foo = new Foo(); $foo->echoAllProperties();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZKTmp
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foo
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, 'echoAllProperties'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Foo:
Function echoallproperties:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 12
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 11
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/ZKTmp
function name:  echoAllProperties
number of ops:  14
compiled vars:  !0 = $value, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_THIS                                       ~2      
          1      > FE_RESET_R                                       $3      ~2, ->12
          2    > > FE_FETCH_R                                       ~4      $3, !0, ->12
          3    >   ASSIGN                                                   !1, ~4
   11     4        ISSET_ISEMPTY_CV                                 ~6      !0
          5        BOOL_NOT                                         ~7      ~6
          6      > JMPZ                                                     ~7, ->11
   12     7    >   CONCAT                                           ~8      !1, '+%3D%3E+'
          8        CONCAT                                           ~9      ~8, !0
          9        CONCAT                                           ~10     ~9, '%0A'
         10        ECHO                                                     ~10
   10    11    > > JMP                                                      ->2
         12    >   FE_FREE                                                  $3
   14    13      > RETURN                                                   null

End of function echoallproperties

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.78 ms | 1394 KiB | 13 Q