3v4l.org

run code in 300+ PHP versions simultaneously
<?php $q = array(); function a() { global $q; $q[] = "a was called"; return 1; } function b() { global $q; $q[] = "b was called"; return 1; } echo a() + b(); echo implode(",", $q);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7aM5h
function name:  (null)
number of ops:  13
compiled vars:  !0 = $q
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'a'
          2        DO_FCALL                                      0  $2      
          3        INIT_FCALL                                               'b'
          4        DO_FCALL                                      0  $3      
          5        ADD                                              ~4      $2, $3
          6        ECHO                                                     ~4
   14     7        INIT_FCALL                                               'implode'
          8        SEND_VAL                                                 '%2C'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $5      
         11        ECHO                                                     $5
         12      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7aM5h
function name:  a
number of ops:  5
compiled vars:  !0 = $q
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_GLOBAL                                              !0, 'q'
    5     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  'a+was+called'
    6     3      > RETURN                                                   1
    7     4*     > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7aM5h
function name:  b
number of ops:  5
compiled vars:  !0 = $q
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   BIND_GLOBAL                                              !0, 'q'
   10     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  'b+was+called'
   11     3      > RETURN                                                   1
   12     4*     > RETURN                                                   null

End of function b

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.5 ms | 1398 KiB | 17 Q