3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); $values = [1, 0, 'foo', false, true, '', null]; var_dump(array_map('strval', $values)); var_dump(array_map(function($v) { return strval($v); }, $values));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mvhRG
function name:  (null)
number of ops:  17
compiled vars:  !0 = $values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'array_map'
          3        SEND_VAL                                                 'strval'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
    8     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'array_map'
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FmvhRG%3A8%240'
   10    11        SEND_VAL                                                 ~4
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FmvhRG%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mvhRG
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        CAST                                          6  ~1      !0
          2      > RETURN                                                   ~1
   10     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FmvhRG%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.93 ms | 1395 KiB | 17 Q