3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array("g", "lol", "hhh", "gob" , "pinapple"); var_dump($x); echo count($x); echo "\n" . mt_rand(0, count($x) - 1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CRGPC
function name:  (null)
number of ops:  15
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    4     4        COUNT                                            ~3      !0
          5        ECHO                                                     ~3
    6     6        INIT_FCALL                                               'mt_rand'
          7        SEND_VAL                                                 0
          8        COUNT                                            ~4      !0
          9        SUB                                              ~5      ~4, 1
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                         $6      
         12        CONCAT                                           ~7      '%0A', $6
         13        ECHO                                                     ~7
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.8 ms | 1386 KiB | 17 Q