3v4l.org

run code in 300+ PHP versions simultaneously
<?php $poor_geek = "H A R R Y P O T T E R"; $voldemort = "Lord Voldemort"; function avada_kedavra(string $fullname): string { if (strpos($fullname, " ") !== false) $fullname = preg_replace("{ (?! )}", "", $fullname); return strtok($fullname, " "); } echo avada_kedavra($poor_geek), " is dead\n"; echo avada_kedavra($voldemort), " cannot die\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nepbd
function name:  (null)
number of ops:  13
compiled vars:  !0 = $poor_geek, !1 = $voldemort
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'H+A+R+R+Y++P+O+T+T+E+R'
    4     1        ASSIGN                                                   !1, 'Lord+Voldemort'
   14     2        INIT_FCALL                                               'avada_kedavra'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
          6        ECHO                                                     '+is+dead%0A'
   15     7        INIT_FCALL                                               'avada_kedavra'
          8        SEND_VAR                                                 !1
          9        DO_FCALL                                      0  $5      
         10        ECHO                                                     $5
         11        ECHO                                                     '+cannot+die%0A'
         12      > RETURN                                                   1

Function avada_kedavra:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/nepbd
function name:  avada_kedavra
number of ops:  21
compiled vars:  !0 = $fullname
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '++'
          4        DO_ICALL                                         $1      
          5        TYPE_CHECK                                  1018          $1
          6      > JMPZ                                                     ~2, ->13
    9     7    >   INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%7B+%28%3F%21+%29%7D'
          9        SEND_VAL                                                 ''
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $3      
         12        ASSIGN                                                   !0, $3
   11    13    >   INIT_FCALL                                               'strtok'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 '+'
         16        DO_ICALL                                         $5      
         17        VERIFY_RETURN_TYPE                                       $5
         18      > RETURN                                                   $5
   12    19*       VERIFY_RETURN_TYPE                                       
         20*     > RETURN                                                   null

End of function avada_kedavra

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.69 ms | 1399 KiB | 21 Q