3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = function (string $bar) { if (is_trusted($bar)) { echo "it's trusted!\n"; } else { echo "it can't be trusted!\n"; } }; $baz = trim(' literal string that gets manipulated '); $foo('literal string not manipulated'); $foo($baz);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IKsY0
function name:  (null)
number of ops:  13
compiled vars:  !0 = $foo, !1 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FIKsY0%3A3%240'
          1        ASSIGN                                                   !0, ~2
   11     2        INIT_FCALL                                               'trim'
          3        SEND_VAL                                                 '+literal+string+that+gets+manipulated+'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
   13     6        INIT_DYNAMIC_CALL                                        !0
          7        SEND_VAL_EX                                              'literal+string+not+manipulated'
          8        DO_FCALL                                      0          
   14     9        INIT_DYNAMIC_CALL                                        !0
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FIKsY0%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IKsY0
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL_BY_NAME                                       'is_trusted'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > JMPZ                                                     $1, ->7
    5     5    >   ECHO                                                     'it%27s+trusted%21%0A'
          6      > JMP                                                      ->8
    7     7    >   ECHO                                                     'it+can%27t+be+trusted%21%0A'
    9     8    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FIKsY0%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.8 ms | 1395 KiB | 15 Q