3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Use your knowledge of strlen(), substr(), and rand() to // print a random character from your name to the screen. $name = "Griseldita"; $nameUno = $name [0]; $nameUltimo = $name [strlen ($name) - 1]; print rand ($nameUno, $nameUltimo); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HurZ1
function name:  (null)
number of ops:  13
compiled vars:  !0 = $name, !1 = $nameUno, !2 = $nameUltimo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'Griseldita'
    5     1        FETCH_DIM_R                                      ~4      !0, 0
          2        ASSIGN                                                   !1, ~4
    6     3        STRLEN                                           ~6      !0
          4        SUB                                              ~7      ~6, 1
          5        FETCH_DIM_R                                      ~8      !0, ~7
          6        ASSIGN                                                   !2, ~8
    7     7        INIT_FCALL                                               'rand'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $10     
         11        ECHO                                                     $10
    8    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.55 ms | 1394 KiB | 15 Q