3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class DB { function escapeSimple($item) { return $item; } } $db = new StdClass(); $db->db = new DB(); $values = array( 'one', 'two', 'three', ); for ($i = 1; $i <= 100000; $i++) { $values_new = array_map(array($db->db, 'escapeSimple'),$values); }
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 21
Branch analysis from position: 21
Jump found. Position 1 = 23, Position 2 = 11
Branch analysis from position: 23
Jump found. Position 1 = -2
Branch analysis from position: 11
Jump found. Position 1 = 23, Position 2 = 11
Branch analysis from position: 23
Branch analysis from position: 11
filename:       /in/EfNJn
function name:  (null)
number of ops:  24
compiled vars:  !0 = $db, !1 = $values, !2 = $i, !3 = $values_new
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  10     1        NEW                                              $5      :-6
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $5
  12     4        NEW                                              $9      :-3
         5        DO_FCALL                                      0          
         6        ASSIGN_OBJ                                               !0, 'db'
         7        OP_DATA                                                  $9
  15     8        ASSIGN                                                   !1, <array>
  20     9        ASSIGN                                                   !2, 1
        10      > JMP                                                      ->21
  21    11    >   INIT_FCALL                                               'array_map'
        12        FETCH_OBJ_R                                      $13     !0, 'db'
        13        INIT_ARRAY                                       ~14     $13
        14        ADD_ARRAY_ELEMENT                                ~14     'escapeSimple'
        15        SEND_VAL                                                 ~14
        16        SEND_VAR                                                 !1
        17        DO_ICALL                                         $15     
        18        ASSIGN                                                   !3, $15
  20    19        POST_INC                                         ~17     !2
        20        FREE                                                     ~17
        21    >   IS_SMALLER_OR_EQUAL                              ~18     !2, 100000
        22      > JMPNZ                                                    ~18, ->11
        23    > > RETURN                                                   1

Class DB:
Function escapesimple:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/EfNJn
function name:  escapeSimple
number of ops:  3
compiled vars:  !0 = $item
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   RECV                                             !0      
   6     1      > RETURN                                                   !0
   7     2*     > RETURN                                                   null

End of function escapesimple

End of class DB.

Generated using Vulcan Logic Dumper, using php 7.2.0