3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar = 'baz'; private $xyz = 'www'; } $f = new Foo(); var_dump(key($f)); var_dump(current($f)); var_dump(next($f)); var_dump(key($f)); var_dump(current($f));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JtStv
function name:  (null)
number of ops:  34
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   10     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'key'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
   11     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'current'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
   12    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'next'
         17        SEND_REF                                                 !0
         18        DO_ICALL                                         $8      
         19        SEND_VAR                                                 $8
         20        DO_ICALL                                                 
   13    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'key'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $10     
         25        SEND_VAR                                                 $10
         26        DO_ICALL                                                 
   14    27        INIT_FCALL                                               'var_dump'
         28        INIT_FCALL                                               'current'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $12     
         31        SEND_VAR                                                 $12
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.82 ms | 1396 KiB | 21 Q