3v4l.org

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