3v4l.org

run code in 300+ PHP versions simultaneously
<?php $magic = 1; function getFalse() { global $magic; $magic = 2; return false; } var_dump($magic ); $a = false && getFalse(); var_dump($magic ); $b = true && getFalse(); var_dump($magic );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AsNqI
function name:  (null)
number of ops:  16
compiled vars:  !0 = $magic, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
    8     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    9     4        ASSIGN                                                   !1, <false>
   10     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   11     8        INIT_FCALL                                               'getfalse'
          9        DO_FCALL                                      0  $7      
         10        BOOL                                             ~8      $7
         11        ASSIGN                                                   !2, ~8
   12    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function getfalse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AsNqI
function name:  getFalse
number of ops:  4
compiled vars:  !0 = $magic
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_GLOBAL                                              !0, 'magic'
    5     1        ASSIGN                                                   !0, 2
    6     2      > RETURN                                                   <false>
    7     3*     > RETURN                                                   null

End of function getfalse

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.22 ms | 1397 KiB | 16 Q