3v4l.org

run code in 300+ PHP versions simultaneously
<?php class gimmeName{ public $array = array('Tisha', 'Vesta', 'Josephine'); public function giveMeUniqueName(){ shuffle($this->array); return array_shift($this->array); } } $gn = new gimmeName; echo $gn->giveMeUniqueName() . PHP_EOL; echo $gn->giveMeUniqueName() . PHP_EOL; echo $gn->giveMeUniqueName() . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GWWmL
function name:  (null)
number of ops:  16
compiled vars:  !0 = $gn
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'gimmeName'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_METHOD_CALL                                         !0, 'giveMeUniqueName'
          4        DO_FCALL                                      0  $4      
          5        CONCAT                                           ~5      $4, '%0A'
          6        ECHO                                                     ~5
   16     7        INIT_METHOD_CALL                                         !0, 'giveMeUniqueName'
          8        DO_FCALL                                      0  $6      
          9        CONCAT                                           ~7      $6, '%0A'
         10        ECHO                                                     ~7
   17    11        INIT_METHOD_CALL                                         !0, 'giveMeUniqueName'
         12        DO_FCALL                                      0  $8      
         13        CONCAT                                           ~9      $8, '%0A'
         14        ECHO                                                     ~9
         15      > RETURN                                                   1

Class gimmeName:
Function givemeuniquename:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GWWmL
function name:  giveMeUniqueName
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'shuffle'
          1        FETCH_OBJ_W                                      $0      'array'
          2        SEND_REF                                                 $0
          3        DO_ICALL                                                 
   10     4        INIT_FCALL                                               'array_shift'
          5        FETCH_OBJ_W                                      $2      'array'
          6        SEND_REF                                                 $2
          7        DO_ICALL                                         $3      
          8      > RETURN                                                   $3
   11     9*     > RETURN                                                   null

End of function givemeuniquename

End of class gimmeName.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.41 ms | 1395 KiB | 17 Q