3v4l.org

run code in 300+ PHP versions simultaneously
<?php $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/2U4iH
function name:  (null)
number of ops:  17
compiled vars:  !0 = $values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     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                                                 
    7     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'array_map'
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F2U4iH%3A7%240'
    9    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%2F2U4iH%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2U4iH
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        CAST                                          6  ~1      !0
          2      > RETURN                                                   ~1
    9     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F2U4iH%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.33 ms | 1395 KiB | 17 Q