3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_preporting(-1); class pupil { static function value($value) { return $value; } } $array = array(42, 3.14); var_dump(each($array)); //$first = reset(pupil::value($array)); var_dump(reset(pupil::value($array))); var_dump(each($array), each($array));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cq7om
function name:  (null)
number of ops:  31
compiled vars:  !0 = $array
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   INIT_FCALL_BY_NAME                                       'error_preporting'
         1        SEND_VAL_EX                                              -1
         2        DO_FCALL                                      0          
   4     3        NOP                                                      
  11     4        ASSIGN                                                   !0, <array>
  13     5        INIT_FCALL                                               'var_dump'
         6        INIT_FCALL                                               'each'
         7        SEND_REF                                                 !0
         8        DO_ICALL                                         $4      
         9        SEND_VAR                                                 $4
        10        DO_ICALL                                                 
  16    11        INIT_FCALL                                               'var_dump'
        12        INIT_FCALL                                               'reset'
        13        INIT_STATIC_METHOD_CALL                                  'pupil', 'value'
        14        SEND_VAR                                                 !0
        15        DO_FCALL                                      0  $6      
        16        SEND_VAR_NO_REF                               0          $6
        17        DO_ICALL                                         $7      
        18        SEND_VAR                                                 $7
        19        DO_ICALL                                                 
  18    20        INIT_FCALL                                               'var_dump'
        21        INIT_FCALL                                               'each'
        22        SEND_REF                                                 !0
        23        DO_ICALL                                         $9      
        24        SEND_VAR                                                 $9
        25        INIT_FCALL                                               'each'
        26        SEND_REF                                                 !0
        27        DO_ICALL                                         $10     
        28        SEND_VAR                                                 $10
        29        DO_ICALL                                                 
        30      > RETURN                                                   1

Class pupil:
Function value:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cq7om
function name:  value
number of ops:  3
compiled vars:  !0 = $value
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   6     0  E >   RECV                                             !0      
   7     1      > RETURN                                                   !0
   8     2*     > RETURN                                                   null

End of function value

End of class pupil.

Generated using Vulcan Logic Dumper, using php 7.3.0