3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types = 1); class HelloWorld { public static function sayHello(string $s): string { $a = [$s => $s]; return array_keys($a)[0]; } } HelloWorld::sayHello('1');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pDkoB
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                      'HelloWorld', 'sayHello'
          1        SEND_VAL                                                     '1'
          2        DO_FCALL                                          0          
          3      > RETURN                                                       1

Class HelloWorld:
Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pDkoB
function name:  sayHello
number of ops:  11
compiled vars:  !0 = $s, !1 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    7     1        INIT_ARRAY                                           ~2      !0, !0
          2        ASSIGN                                                       !1, ~2
    9     3        INIT_FCALL                                                   'array_keys'
          4        SEND_VAR                                                     !1
          5        DO_ICALL                                             $4      
          6        FETCH_DIM_R                                          ~5      $4, 0
          7        VERIFY_RETURN_TYPE                                           ~5
          8      > RETURN                                                       ~5
   10     9*       VERIFY_RETURN_TYPE                                           
         10*     > RETURN                                                       null

End of function sayhello

End of class HelloWorld.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.32 ms | 1613 KiB | 14 Q