3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = '/Date(1617667200000+0000)/'; preg_match('#\/Date\((\d{10})#', $text, $matches); $dt = new DateTime('@'.$matches[1]); echo $dt->format('Y-m-d H:i:s');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5jT5B
function name:  (null)
number of ops:  17
compiled vars:  !0 = $text, !1 = $matches, !2 = $dt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2FDate%281617667200000%2B0000%29%2F'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%23%5C%2FDate%5C%28%28%5Cd%7B10%7D%29%23'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    5     6        NEW                                              $5      'DateTime'
          7        FETCH_DIM_R                                      ~6      !1, 1
          8        CONCAT                                           ~7      '%40', ~6
          9        SEND_VAL_EX                                              ~7
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $5
    6    12        INIT_METHOD_CALL                                         !2, 'format'
         13        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         14        DO_FCALL                                      0  $10     
         15        ECHO                                                     $10
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.22 ms | 1450 KiB | 14 Q