3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <body> <?php $t; function myCalculations () { $x=22; echo "<p>Test variable oustide of function:</p>"; echo "Variable x is: $x"; echo "<br>"; echo "Variable t is: $t"; }// Code will only display x myCalculations(); echo "<p>Test variable inside of function:</p>"; echo "Variable x is: $x"; echo "<br>"; echo "Variable t is: $t"; ?>//Code will only display t </body> </html>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aR02v
function name:  (null)
number of ops:  13
compiled vars:  !0 = $t, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%3Cbody%3E%0A'
   13     1        INIT_FCALL                                               'mycalculations'
          2        DO_FCALL                                      0          
   14     3        ECHO                                                     '%3Cp%3ETest+variable+inside+of+function%3A%3C%2Fp%3E'
   15     4        NOP                                                      
          5        FAST_CONCAT                                      ~3      'Variable+x+is%3A+', !1
          6        ECHO                                                     ~3
   16     7        ECHO                                                     '%3Cbr%3E'
   17     8        NOP                                                      
          9        FAST_CONCAT                                      ~4      'Variable+t+is%3A+', !0
         10        ECHO                                                     ~4
   18    11        ECHO                                                     '%2F%2FCode+will+only+display+t%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   20    12      > RETURN                                                   1

Function mycalculations:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aR02v
function name:  myCalculations
number of ops:  10
compiled vars:  !0 = $x, !1 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 22
    8     1        ECHO                                                     '%3Cp%3ETest+variable+oustide+of+function%3A%3C%2Fp%3E'
    9     2        NOP                                                      
          3        FAST_CONCAT                                      ~3      'Variable+x+is%3A+', !0
          4        ECHO                                                     ~3
   10     5        ECHO                                                     '%3Cbr%3E'
   11     6        NOP                                                      
          7        FAST_CONCAT                                      ~4      'Variable+t+is%3A+', !1
          8        ECHO                                                     ~4
   12     9      > RETURN                                                   null

End of function mycalculations

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.14 ms | 1398 KiB | 14 Q