3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Shit { public static function getShits() { return [ new Shit, new Shit, new Shit ]; } public function getTird() { return 'sucks'; } public function getPoopies() { return range(0,10); } } $shits = array(); foreach(Shit::getShits() as $shit) { $shits[] = array( 'tird' => $shit->getTird(), 'ffff' => array_map( function($val) { // can't return key = value }, $this->getPoopies() ) ); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 20
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 20
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/36qjO
function name:  (null)
number of ops:  22
compiled vars:  !0 = $shits, !1 = $shit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_STATIC_METHOD_CALL                                  'Shit', 'getShits'
          2        DO_FCALL                                      0  $3      
          3      > FE_RESET_R                                       $4      $3, ->20
          4    > > FE_FETCH_R                                               $4, !1, ->20
   20     5    >   INIT_METHOD_CALL                                         !1, 'getTird'
          6        DO_FCALL                                      0  $6      
          7        INIT_ARRAY                                       ~7      $6, 'tird'
   21     8        INIT_FCALL                                               'array_map'
   22     9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F36qjO%3A22%240'
   24    10        SEND_VAL                                                 ~8
   25    11        FETCH_THIS                                       $9      
         12        INIT_METHOD_CALL                                         $9, 'getPoopies'
         13        DO_FCALL                                      0  $10     
         14        SEND_VAR                                                 $10
         15        DO_ICALL                                         $11     
         16        ADD_ARRAY_ELEMENT                                ~7      $11, 'ffff'
   19    17        ASSIGN_DIM                                               !0
   25    18        OP_DATA                                                  ~7
   18    19      > JMP                                                      ->4
         20    >   FE_FREE                                                  $4
   28    21      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F36qjO%3A22%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/36qjO
function name:  {closure}
number of ops:  2
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
   24     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F36qjO%3A22%240

Class Shit:
Function getshits:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/36qjO
function name:  getShits
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $0      'Shit'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~2      $0
    6     3        NEW                                              $3      'Shit'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~2      $3
    7     6        NEW                                              $5      'Shit'
          7        DO_FCALL                                      0          
          8        ADD_ARRAY_ELEMENT                                ~2      $5
          9      > RETURN                                                   ~2
    9    10*     > RETURN                                                   null

End of function getshits

Function gettird:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/36qjO
function name:  getTird
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   'sucks'
   12     1*     > RETURN                                                   null

End of function gettird

Function getpoopies:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/36qjO
function name:  getPoopies
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 10
          3        DO_ICALL                                         $0      
          4      > RETURN                                                   $0
   15     5*     > RETURN                                                   null

End of function getpoopies

End of class Shit.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.06 ms | 1400 KiB | 17 Q