3v4l.org

run code in 300+ PHP versions simultaneously
<?php function show_aval($place) { echo $place; } $avalrooms = []; $cities = ["london", "york", "liverpool"]; foreach ($cities as $city) { ob_start(); show_aval($city); $avalrooms[$city] = ob_get_contents(); ob_clean(); } print_r($avalrooms);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/rTWg8
function name:  (null)
number of ops:  21
compiled vars:  !0 = $avalrooms, !1 = $cities, !2 = $city
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, <array>
    8     2      > FE_RESET_R                                       $5      !1, ->16
          3    > > FE_FETCH_R                                               $5, !2, ->16
    9     4    >   INIT_FCALL                                               'ob_start'
          5        DO_ICALL                                                 
   10     6        INIT_FCALL                                               'show_aval'
          7        SEND_VAR                                                 !2
          8        DO_FCALL                                      0          
   11     9        INIT_FCALL                                               'ob_get_contents'
         10        DO_ICALL                                         $9      
         11        ASSIGN_DIM                                               !0, !2
         12        OP_DATA                                                  $9
   12    13        INIT_FCALL                                               'ob_clean'
         14        DO_ICALL                                                 
    8    15      > JMP                                                      ->3
         16    >   FE_FREE                                                  $5
   15    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

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

End of function show_aval

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
126.13 ms | 1017 KiB | 18 Q