3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array_reduce( array(), function ($id, $arg) { if (is_scalar($arg) || is_resource($arg)) { return $id.$arg; } return is_object($arg) ? spl_object_hash($arg) : serialize($arg); }, '' ); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5asSM
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'array_reduce'
    3     1        SEND_VAL                                                 <array>
    4     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5asSM%3A4%240'
   10     3        SEND_VAL                                                 ~1
   11     4        SEND_VAL                                                 ''
          5        DO_ICALL                                         $2      
    2     6        ASSIGN                                                   !0, $2
   14     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F5asSM%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/5asSM
function name:  {closure}
number of ops:  22
compiled vars:  !0 = $id, !1 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        TYPE_CHECK                                  124  ~2      !1
          3      > JMPNZ_EX                                         ~2      ~2, ->6
          4    >   TYPE_CHECK                                  512  ~3      !1
          5        BOOL                                             ~2      ~3
          6    > > JMPZ                                                     ~2, ->9
    6     7    >   CONCAT                                           ~4      !0, !1
          8      > RETURN                                                   ~4
    9     9    >   TYPE_CHECK                                  256          !1
         10      > JMPZ                                                     ~5, ->16
         11    >   INIT_FCALL                                               'spl_object_hash'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $6      
         14        QM_ASSIGN                                        ~7      $6
         15      > JMP                                                      ->20
         16    >   INIT_FCALL                                               'serialize'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $8      
         19        QM_ASSIGN                                        ~7      $8
         20    > > RETURN                                                   ~7
   10    21*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F5asSM%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.35 ms | 1400 KiB | 21 Q