3v4l.org

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

Function my_strlen:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/os18S
function name:  my_strlen
number of ops:  6
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        STRLEN                                           ~1      !0
          2        VERIFY_RETURN_TYPE                                       ~1
          3      > RETURN                                                   ~1
    5     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function my_strlen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.45 ms | 1397 KiB | 15 Q