3v4l.org

run code in 300+ 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:  15
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '+'
          3        INIT_FCALL                                               'array_map'
          4        SEND_VAL                                                 'strrev'
          5        INIT_FCALL                                               'explode'
          6        SEND_VAL                                                 '+'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $1      
          9        SEND_VAR                                                 $1
         10        DO_ICALL                                         $2      
         11        SEND_VAR                                                 $2
         12        DO_ICALL                                         $3      
         13      > RETURN                                                   $3
    5    14*     > RETURN                                                   null

End of function reversewords

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.23 ms | 1006 KiB | 18 Q