3v4l.org

run code in 300+ PHP versions simultaneously
<?php $question = "Number?"; function Test() { global $question; static $num = 0; $oldway .= ā€˜\nā€˜; echo $question, ++$num; } echo Test(); echo Test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mjuve
function name:  (null)
number of ops:  8
compiled vars:  !0 = $question
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Number%3F'
   11     1        INIT_FCALL                                               'test'
          2        DO_FCALL                                      0  $2      
          3        ECHO                                                     $2
   12     4        INIT_FCALL                                               'test'
          5        DO_FCALL                                      0  $3      
          6        ECHO                                                     $3
          7      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mjuve
function name:  Test
number of ops:  8
compiled vars:  !0 = $question, !1 = $num, !2 = $oldway
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_GLOBAL                                              !0, 'question'
    7     1        BIND_STATIC                                              !1
    8     2        FETCH_CONSTANT                                   ~3      '%E2%80%98%5Cn%E2%80%98'
          3        ASSIGN_OP                                     8          !2, ~3
    9     4        ECHO                                                     !0
          5        PRE_INC                                          ~5      !1
          6        ECHO                                                     ~5
   10     7      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.57 ms | 1401 KiB | 15 Q