3v4l.org

run code in 300+ PHP versions simultaneously
<?php function randomname(){ $names = array( 'Bob', 'Pieter', 'Josh', 'Dennis', 'Charlotte', 'Sophie', 'Robin', 'Renee' ); $surnames = array( 'Bouwer', 'Cola', 'Fanta', 'Pepsi', 'De Berg', 'Kaas', 'Hamburger' ); $random = rand(0,7); $random2 = rand(0,6); $name = $names[$random]; $surname = $surnames[$random2]; if (rand(0, 1)) $name = strtolower($name); if (rand(0, 1)) $surname = strtolower($surname); echo $name . ' ' . $surname; } echo randomname();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kIO1F
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   INIT_FCALL                                               'randomname'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function randomname:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 34
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
Branch analysis from position: 25
filename:       /in/kIO1F
function name:  randomname
number of ops:  38
compiled vars:  !0 = $names, !1 = $surnames, !2 = $random, !3 = $random2, !4 = $name, !5 = $surname
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        ASSIGN                                                   !1, <array>
   24     2        INIT_FCALL                                               'rand'
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 7
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !2, $8
   25     7        INIT_FCALL                                               'rand'
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 6
         10        DO_ICALL                                         $10     
         11        ASSIGN                                                   !3, $10
   27    12        FETCH_DIM_R                                      ~12     !0, !2
         13        ASSIGN                                                   !4, ~12
   28    14        FETCH_DIM_R                                      ~14     !1, !3
         15        ASSIGN                                                   !5, ~14
   30    16        INIT_FCALL                                               'rand'
         17        SEND_VAL                                                 0
         18        SEND_VAL                                                 1
         19        DO_ICALL                                         $16     
         20      > JMPZ                                                     $16, ->25
         21    >   INIT_FCALL                                               'strtolower'
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                         $17     
         24        ASSIGN                                                   !4, $17
   31    25    >   INIT_FCALL                                               'rand'
         26        SEND_VAL                                                 0
         27        SEND_VAL                                                 1
         28        DO_ICALL                                         $19     
         29      > JMPZ                                                     $19, ->34
         30    >   INIT_FCALL                                               'strtolower'
         31        SEND_VAR                                                 !5
         32        DO_ICALL                                         $20     
         33        ASSIGN                                                   !5, $20
   33    34    >   CONCAT                                           ~22     !4, '+'
         35        CONCAT                                           ~23     ~22, !5
         36        ECHO                                                     ~23
   35    37      > RETURN                                                   null

End of function randomname

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.98 ms | 1414 KiB | 18 Q