3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create an array and push on the names // of your closest family and friends $name = array(); array_push($name,"Mike"); array_push($name,"Jane"); array_push($name,"Jack"); array_push($name,"Nike"); array_push($name,"Ash"); array_push($name,"Chris"); array_push($name,"Zark"); // Sort the list sort($name); join(",",$name); // Randomly select a winner! $random = count($name,rand(0,7)); // Print the winner's name in ALL CAPS $winner = strtoupper($name[array_rand($name)]); print($winner); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JTuXg
function name:  (null)
number of ops:  55
compiled vars:  !0 = $name, !1 = $random, !2 = $winner
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_push'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'Mike'
          4        DO_ICALL                                                 
    6     5        INIT_FCALL                                               'array_push'
          6        SEND_REF                                                 !0
          7        SEND_VAL                                                 'Jane'
          8        DO_ICALL                                                 
    7     9        INIT_FCALL                                               'array_push'
         10        SEND_REF                                                 !0
         11        SEND_VAL                                                 'Jack'
         12        DO_ICALL                                                 
    8    13        INIT_FCALL                                               'array_push'
         14        SEND_REF                                                 !0
         15        SEND_VAL                                                 'Nike'
         16        DO_ICALL                                                 
    9    17        INIT_FCALL                                               'array_push'
         18        SEND_REF                                                 !0
         19        SEND_VAL                                                 'Ash'
         20        DO_ICALL                                                 
   10    21        INIT_FCALL                                               'array_push'
         22        SEND_REF                                                 !0
         23        SEND_VAL                                                 'Chris'
         24        DO_ICALL                                                 
   11    25        INIT_FCALL                                               'array_push'
         26        SEND_REF                                                 !0
         27        SEND_VAL                                                 'Zark'
         28        DO_ICALL                                                 
   17    29        INIT_FCALL                                               'sort'
         30        SEND_REF                                                 !0
         31        DO_ICALL                                                 
   18    32        INIT_FCALL                                               'join'
         33        SEND_VAL                                                 '%2C'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                                 
   22    36        INIT_FCALL                                               'count'
         37        SEND_VAR                                                 !0
         38        INIT_FCALL                                               'rand'
         39        SEND_VAL                                                 0
         40        SEND_VAL                                                 7
         41        DO_ICALL                                         $13     
         42        SEND_VAR                                                 $13
         43        DO_ICALL                                         $14     
         44        ASSIGN                                                   !1, $14
   24    45        INIT_FCALL                                               'strtoupper'
         46        INIT_FCALL                                               'array_rand'
         47        SEND_VAR                                                 !0
         48        DO_ICALL                                         $16     
         49        FETCH_DIM_R                                      ~17     !0, $16
         50        SEND_VAL                                                 ~17
         51        DO_ICALL                                         $18     
         52        ASSIGN                                                   !2, $18
   25    53        ECHO                                                     !2
   26    54      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.34 ms | 1400 KiB | 27 Q