3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Issue #8 array_first and array_last alias standard library functions * @link https://github.com/brandonwamboldt/utilphp/issues/8 */ class pupil { static function value($value) { return $value; } } $array = range(0, 1); var_dump(each($array)); $first = 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/fLHMo
function name:  (null)
number of ops:  29
compiled vars:  !0 = $array, !1 = $first
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 1
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
   16     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL_BY_NAME                                       'each'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0  $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                                 
   18    11        INIT_FCALL                                               'reset'
         12        INIT_STATIC_METHOD_CALL                                  'pupil', 'value'
         13        SEND_VAR                                                 !0
         14        DO_FCALL                                      0  $6      
         15        SEND_VAR_NO_REF                               0          $6
         16        DO_ICALL                                         $7      
         17        ASSIGN                                                   !1, $7
   20    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL_BY_NAME                                       'each'
         20        SEND_VAR_EX                                              !0
         21        DO_FCALL                                      0  $9      
         22        SEND_VAR                                                 $9
         23        INIT_FCALL_BY_NAME                                       'each'
         24        SEND_VAR_EX                                              !0
         25        DO_FCALL                                      0  $10     
         26        SEND_VAR                                                 $10
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

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

End of function value

End of class pupil.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.65 ms | 1396 KiB | 19 Q