3v4l.org

run code in 300+ PHP versions simultaneously
<?php function revStr(string $str): string { $str = str_split($str); krsort($str); return implode($str); } echo revStr('SnackOverflow');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eaSDn
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'revstr'
          1        SEND_VAL                                                 'SnackOverflow'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function revstr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eaSDn
function name:  revStr
number of ops:  15
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'str_split'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    6     5        INIT_FCALL                                               'krsort'
          6        SEND_REF                                                 !0
          7        DO_ICALL                                                 
    7     8        INIT_FCALL                                               'implode'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $4      
         11        VERIFY_RETURN_TYPE                                       $4
         12      > RETURN                                                   $4
    8    13*       VERIFY_RETURN_TYPE                                       
         14*     > RETURN                                                   null

End of function revstr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.34 ms | 1014 KiB | 17 Q