3v4l.org

run code in 300+ PHP versions simultaneously
<?php function trues() { foreach(get_defined_constants() as $k => $v) if(strtolower($k) === "true") var_dump($k,v); } trues(); echo "----\n"; define('TRUE', 3); trues();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lcm1Ti
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'trues'
          1        DO_FCALL                                      0          
    9     2        ECHO                                                     '----%0A'
   10     3        INIT_FCALL                                               'define'
          4        SEND_VAL                                                 'TRUE'
          5        SEND_VAL                                                 3
          6        DO_ICALL                                                 
   11     7        INIT_FCALL                                               'trues'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function trues:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/lcm1Ti
function name:  trues
number of ops:  18
compiled vars:  !0 = $v, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'get_defined_constants'
          1        DO_ICALL                                         $2      
          2      > FE_RESET_R                                       $3      $2, ->16
          3    > > FE_FETCH_R                                       ~4      $3, !0, ->16
          4    >   ASSIGN                                                   !1, ~4
    5     5        INIT_FCALL                                               'strtolower'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        IS_IDENTICAL                                             $6, 'true'
          9      > JMPZ                                                     ~7, ->15
         10    >   INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        FETCH_CONSTANT                                   ~8      'v'
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                                 
    4    15    > > JMP                                                      ->3
         16    >   FE_FREE                                                  $3
    6    17      > RETURN                                                   null

End of function trues

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.91 ms | 1399 KiB | 23 Q