3v4l.org

run code in 500+ PHP versions simultaneously
<?php function reverseWords($str) { return implode(' ', array_map('strrev', explode(' ', $str))); } echo reverseWords("this is a string"), PHP_EOL; echo reverseWords("this is a string");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hTle3
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                                   'reversewords'
          1        SEND_VAL                                                     'this+is+a+string'
          2        DO_FCALL                                          0  $0      
          3        ECHO                                                         $0
          4        ECHO                                                         '%0A'
    8     5        INIT_FCALL                                                   'reversewords'
          6        SEND_VAL                                                     'this+is+++++a+string'
          7        DO_FCALL                                          0  $1      
          8        ECHO                                                         $1
          9      > RETURN                                                       1

Function reversewords:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hTle3
function name:  reverseWords
number of ops:  12
compiled vars:  !0 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        INIT_FCALL                                                   'array_map'
          2        SEND_VAL                                                     'strrev'
          3        INIT_FCALL                                                   'explode'
          4        SEND_VAL                                                     '+'
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                             $1      
          7        SEND_VAR                                                     $1
          8        DO_ICALL                                             $2      
          9        FRAMELESS_ICALL_2                implode             ~3      '+', $2
         10      > RETURN                                                       ~3
    5    11*     > RETURN                                                       null

End of function reversewords

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
225.64 ms | 2097 KiB | 17 Q