3v4l.org

run code in 300+ PHP versions simultaneously
<?php function str_reverse( $str ){ return implode("", array_reverse( str_split( (string)$str ) ) ); } print str_reverse("Marlboro tobacco ruined my life with a lot of lung cancer.");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l3GKD
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'str_reverse'
          1        SEND_VAL                                                 'Marlboro+tobacco+ruined+my+life+with+a+lot+of+lung+cancer.'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

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

End of function str_reverse

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.08 ms | 1397 KiB | 20 Q