3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function chinese_date($timestamp, $output_delimiter = ' '){ $info_arr = explode(' ',date('Y m d H i s',strtotime('now'))); return implode($output_delimiter, array_map(function($v,$k){ echo $k.'-'.$v.'|'; return $v; }, $info_arr, array_keys($info_arr))); } echo chinese_date('now');
based on v6YUO
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/UKTcB
function name:  (null)
number of ops:  6
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
  10     1        INIT_FCALL                                               'chinese_date'
         2        SEND_VAL                                                 'now'
         3        DO_FCALL                                      0  $0      
         4        ECHO                                                     $0
         5      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FUKTcB0x7f4a11c920f1:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/UKTcB
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v, !1 = $k
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   RECV                                             !0      
         1        RECV                                             !1      
   6     2        CONCAT                                           ~2      !1, '-'
         3        CONCAT                                           ~3      ~2, !0
         4        CONCAT                                           ~4      ~3, '%7C'
         5        ECHO                                                     ~4
   7     6      > RETURN                                                   !0
   8     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FUKTcB0x7f4a11c920f1

Function chinese_date:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/UKTcB
function name:  chinese_date
number of ops:  29
compiled vars:  !0 = $timestamp, !1 = $output_delimiter, !2 = $info_arr
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   RECV                                             !0      
         1        RECV_INIT                                        !1      '+'
   3     2        INIT_FCALL                                               'explode'
         3        SEND_VAL                                                 '+'
         4        INIT_FCALL                                               'date'
         5        SEND_VAL                                                 'Y+m+d+H+i+s'
         6        INIT_FCALL                                               'strtotime'
         7        SEND_VAL                                                 'now'
         8        DO_ICALL                                         $3      
         9        SEND_VAR                                                 $3
        10        DO_ICALL                                         $4      
        11        SEND_VAR                                                 $4
        12        DO_ICALL                                         $5      
        13        ASSIGN                                                   !2, $5
   5    14        INIT_FCALL                                               'implode'
        15        SEND_VAR                                                 !1
        16        INIT_FCALL                                               'array_map'
        17        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FUKTcB0x7f4a11c920f1'
   8    18        SEND_VAL                                                 ~7
        19        SEND_VAR                                                 !2
        20        INIT_FCALL                                               'array_keys'
        21        SEND_VAR                                                 !2
        22        DO_ICALL                                         $8      
        23        SEND_VAR                                                 $8
        24        DO_ICALL                                         $9      
        25        SEND_VAR                                                 $9
        26        DO_ICALL                                         $10     
        27      > RETURN                                                   $10
   9    28*     > RETURN                                                   null

End of function chinese_date

Generated using Vulcan Logic Dumper, using php 7.1.0