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";;){ if ($flower == "rose" || $flower == "blue" ){ echo "{$flower}s are ",($obj->color)($flower),"\n"; $flower = "violet"; } else { break; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 8
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 47) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 24
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 12
filename:       /in/q9mGt
function name:  (null)
number of ops:  27
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%2Fq9mGt%3A7%240'
          4        ASSIGN_OBJ                                               !0, 'color'
   13     5        OP_DATA                                                  ~6
   14     6        ASSIGN                                                   !1, 'rose'
          7      > JMP                                                      ->25
   15     8    >   IS_EQUAL                                         ~8      !1, 'rose'
          9      > JMPNZ_EX                                         ~8      ~8, ->12
         10    >   IS_EQUAL                                         ~9      !1, 'blue'
         11        BOOL                                             ~8      ~9
         12    > > JMPZ                                                     ~8, ->24
   16    13    >   NOP                                                      
         14        FAST_CONCAT                                      ~10     !1, 's+are+'
         15        ECHO                                                     ~10
         16        FETCH_OBJ_R                                      ~11     !0, 'color'
         17        INIT_DYNAMIC_CALL                                        ~11
         18        SEND_VAR_EX                                              !1
         19        DO_FCALL                                      0  $12     
         20        ECHO                                                     $12
         21        ECHO                                                     '%0A'
   17    22        ASSIGN                                                   !1, 'violet'
         23      > JMP                                                      ->25
   19    24    > > JMP                                                      ->26
         25    > > JMPNZ                                                    <true>, ->8
   21    26    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fq9mGt%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q9mGt
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%2Fq9mGt%3A7%240

Class myClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.86 ms | 1399 KiB | 13 Q