3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public static function pouet() { $main_category_currency = 1; $children = array( array('id_category'=>10), array('id_category'=>15), ); function map($child) { return $child['id_category']; } return array_unique(array_merge( array($main_category_currency), array_map("map",$children) ), SORT_NUMERIC); } } var_dump(Test::pouet());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fe3Yh
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'Test', 'pouet'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Function %00map%2Fin%2Ffe3Yh%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fe3Yh
function name:  map
number of ops:  4
compiled vars:  !0 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        FETCH_DIM_R                                      ~1      !0, 'id_category'
          2      > RETURN                                                   ~1
   14     3*     > RETURN                                                   null

End of function %00map%2Fin%2Ffe3Yh%3A11%240

Class Test:
Function pouet:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fe3Yh
function name:  pouet
number of ops:  18
compiled vars:  !0 = $main_category_currency, !1 = $children
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 1
    7     1        ASSIGN                                                   !1, <array>
   11     2        DECLARE_FUNCTION                                         'map'
   15     3        INIT_FCALL                                               'array_unique'
          4        INIT_FCALL                                               'array_merge'
   16     5        INIT_ARRAY                                       ~4      !0
          6        SEND_VAL                                                 ~4
   17     7        INIT_FCALL                                               'array_map'
          8        SEND_VAL                                                 'map'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
   18    14        SEND_VAL                                                 1
         15        DO_ICALL                                         $7      
         16      > RETURN                                                   $7
   19    17*     > RETURN                                                   null

End of function pouet

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.6 ms | 1396 KiB | 21 Q