3v4l.org

run code in 300+ PHP versions simultaneously
<?php $magic = 1; function getFalse() { global $magic; $magic = 2; return false; } $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/HP7mj
function name:  (null)
number of ops:  13
compiled vars:  !0 = $magic, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
    9     1        ASSIGN                                                   !1, <false>
   10     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
   11     5        INIT_FCALL                                               'getfalse'
          6        DO_FCALL                                      0  $6      
          7        BOOL                                             ~7      $6
          8        ASSIGN                                                   !2, ~7
   12     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function getfalse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HP7mj
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:
147.2 ms | 1389 KiB | 16 Q