3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { } $obj = new myClass; $obj->color = function( $flower ){ $arr = ["rose"=>"red", "violet"=>"blue", "grass"=>"green"]; return $arr[$flower]; }; for ($flower = "rose";; ) { echo "{$flower}s are ",($obj->color)($flower),"\n"; break; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 8
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
filename:       /in/QoV9N
function name:  (null)
number of ops:  20
compiled vars:  !0 = $obj, !1 = $flower
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $2      'myClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    7     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FQoV9N%3A7%240'
          4        ASSIGN_OBJ                                               !0, 'color'
   13     5        OP_DATA                                                  ~6
   14     6        ASSIGN                                                   !1, 'rose'
          7      > JMP                                                      ->18
   16     8    >   NOP                                                      
          9        FAST_CONCAT                                      ~8      !1, 's+are+'
         10        ECHO                                                     ~8
         11        FETCH_OBJ_R                                      ~9      !0, 'color'
         12        INIT_DYNAMIC_CALL                                        ~9
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0  $10     
         15        ECHO                                                     $10
         16        ECHO                                                     '%0A'
   17    17      > JMP                                                      ->19
         18    > > JMPNZ                                                    <true>, ->8
   19    19    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FQoV9N%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QoV9N
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $flower, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN                                                   !1, <array>
   12     2        FETCH_DIM_R                                      ~3      !1, !0
          3      > RETURN                                                   ~3
   13     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FQoV9N%3A7%240

Class myClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.58 ms | 1386 KiB | 13 Q