3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( new Person('thomas', 'gutbier'), new Person('mathhias', 'gutbier'), new Person('ursula', 'breidenstein'), new Person('salbert', 'friemel') ); foreach ($a as $person) { echo $person->render(); } class Person { var $name; var $vorname; public function Person ($name, $vorname) { $this->name = $name; $this->vorname = $vorname; } public function render() { return $this->vorname . ' ' . $this->name . "\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 27
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/Oi5gH
function name:  (null)
number of ops:  29
compiled vars:  !0 = $a, !1 = $person
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'Person'
          1        SEND_VAL_EX                                              'thomas'
          2        SEND_VAL_EX                                              'gutbier'
          3        DO_FCALL                                      0          
          4        INIT_ARRAY                                       ~4      $2
    4     5        NEW                                              $5      'Person'
          6        SEND_VAL_EX                                              'mathhias'
          7        SEND_VAL_EX                                              'gutbier'
          8        DO_FCALL                                      0          
          9        ADD_ARRAY_ELEMENT                                ~4      $5
    5    10        NEW                                              $7      'Person'
         11        SEND_VAL_EX                                              'ursula'
         12        SEND_VAL_EX                                              'breidenstein'
         13        DO_FCALL                                      0          
         14        ADD_ARRAY_ELEMENT                                ~4      $7
    6    15        NEW                                              $9      'Person'
         16        SEND_VAL_EX                                              'salbert'
         17        SEND_VAL_EX                                              'friemel'
         18        DO_FCALL                                      0          
         19        ADD_ARRAY_ELEMENT                                ~4      $9
    2    20        ASSIGN                                                   !0, ~4
    8    21      > FE_RESET_R                                       $12     !0, ->27
         22    > > FE_FETCH_R                                               $12, !1, ->27
    9    23    >   INIT_METHOD_CALL                                         !1, 'render'
         24        DO_FCALL                                      0  $13     
         25        ECHO                                                     $13
    8    26      > JMP                                                      ->22
         27    >   FE_FREE                                                  $12
   25    28      > RETURN                                                   1

Class Person:
Function person:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Oi5gH
function name:  Person
number of ops:  7
compiled vars:  !0 = $name, !1 = $vorname
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   17     2        ASSIGN_OBJ                                               'name'
          3        OP_DATA                                                  !0
   18     4        ASSIGN_OBJ                                               'vorname'
          5        OP_DATA                                                  !1
   19     6      > RETURN                                                   null

End of function person

Function render:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Oi5gH
function name:  render
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   FETCH_OBJ_R                                      ~0      'vorname'
          1        CONCAT                                           ~1      ~0, '+'
          2        FETCH_OBJ_R                                      ~2      'name'
          3        CONCAT                                           ~3      ~1, ~2
          4        CONCAT                                           ~4      ~3, '%0A'
          5      > RETURN                                                   ~4
   24     6*     > RETURN                                                   null

End of function render

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.03 ms | 1399 KiB | 13 Q