3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( 0 => '124,95', 1 => '139,95', 2 => '149,95', 3 => '1.200', 4 => '150', 5 => '154,95', 6 => '130', 7 => '189,95', 8 => '199,95', 9 => '30', 10 => '150', 11 => '1.234.567,89' ); $new_array = array_map(function ($v) { return (float)strtr($v, array(',' => '.', '.' => '')); }, $array); echo number_format(min($new_array), 2, ',', '.') . "\n"; echo number_format(max($new_array), 2, ',', '.') . "\n";;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NE2ln
function name:  (null)
number of ops:  30
compiled vars:  !0 = $array, !1 = $new_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   17     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNE2ln%3A17%240'
          3        SEND_VAL                                                 ~3
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   18     7        INIT_FCALL                                               'number_format'
          8        INIT_FCALL                                               'min'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        SEND_VAL                                                 2
         13        SEND_VAL                                                 '%2C'
         14        SEND_VAL                                                 '.'
         15        DO_ICALL                                         $7      
         16        CONCAT                                           ~8      $7, '%0A'
         17        ECHO                                                     ~8
   19    18        INIT_FCALL                                               'number_format'
         19        INIT_FCALL                                               'max'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $9      
         22        SEND_VAR                                                 $9
         23        SEND_VAL                                                 2
         24        SEND_VAL                                                 '%2C'
         25        SEND_VAL                                                 '.'
         26        DO_ICALL                                         $10     
         27        CONCAT                                           ~11     $10, '%0A'
         28        ECHO                                                     ~11
         29      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FNE2ln%3A17%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NE2ln
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'strtr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                         $1      
          5        CAST                                          5  ~2      $1
          6      > RETURN                                                   ~2
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FNE2ln%3A17%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
130.88 ms | 1401 KiB | 23 Q