3v4l.org

run code in 500+ PHP versions simultaneously
<?php final class Service { public function reverse(string $word): string { return strrev($word); } } $service = new Service(); echo $service->reverse('potato');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cKECo
function name:  (null)
number of ops:  8
compiled vars:  !0 = $service
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   NEW                                                  $1      'Service'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   13     3        INIT_METHOD_CALL                                             !0, 'reverse'
          4        SEND_VAL_EX                                                  'potato'
          5        DO_FCALL                                          0  $4      
          6        ECHO                                                         $4
          7      > RETURN                                                       1

Class Service:
Function reverse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cKECo
function name:  reverse
number of ops:  8
compiled vars:  !0 = $word
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    7     1        INIT_FCALL                                                   'strrev'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $1      
          4        VERIFY_RETURN_TYPE                                           $1
          5      > RETURN                                                       $1
    8     6*       VERIFY_RETURN_TYPE                                           
          7*     > RETURN                                                       null

End of function reverse

End of class Service.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.99 ms | 2262 KiB | 14 Q