3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Emp { public $name = ""; public $hobbies = ""; public $birthdate = ""; } $e = new Emp(); $e->name = "sachin"; $e->hobbies = "sports"; $e->birthdate = date('m/d/Y h:i:s a', "8/5/1974 12:20:03 p"); $e->birthdate = date('m/d/Y h:i:s a', strtotime("8/5/1974 12:20:03")); echo json_encode($e); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7tI8M
function name:  (null)
number of ops:  27
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'Emp'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   10     3        ASSIGN_OBJ                                               !0, 'name'
          4        OP_DATA                                                  'sachin'
   11     5        ASSIGN_OBJ                                               !0, 'hobbies'
          6        OP_DATA                                                  'sports'
   12     7        INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'm%2Fd%2FY+h%3Ai%3As+a'
          9        SEND_VAL                                                 '8%2F5%2F1974+12%3A20%3A03+p'
         10        DO_ICALL                                         $7      
         11        ASSIGN_OBJ                                               !0, 'birthdate'
         12        OP_DATA                                                  $7
   13    13        INIT_FCALL                                               'date'
         14        SEND_VAL                                                 'm%2Fd%2FY+h%3Ai%3As+a'
         15        INIT_FCALL                                               'strtotime'
         16        SEND_VAL                                                 '8%2F5%2F1974+12%3A20%3A03'
         17        DO_ICALL                                         $9      
         18        SEND_VAR                                                 $9
         19        DO_ICALL                                         $10     
         20        ASSIGN_OBJ                                               !0, 'birthdate'
         21        OP_DATA                                                  $10
   15    22        INIT_FCALL                                               'json_encode'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $11     
         25        ECHO                                                     $11
   16    26      > RETURN                                                   1

Class Emp: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.57 ms | 1395 KiB | 19 Q