3v4l.org

run code in 300+ PHP versions simultaneously
<?php // *convert array to object* $array_name = ["id" => 321313,"username" => "shahbaz"]; $object = (object) $array_name; //now it is converted to object and you can access it. echo $object->username; echo $object["username"]; $o = new ArrayObject($array_name); echo "\n",($o == $object)? 'true': 'false',"\n"; echo $o["username"];

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0080.00816.75
8.3.50.0110.00716.13
8.3.40.0040.01118.92
8.3.30.0110.00318.54
8.3.20.0050.00320.20
8.3.10.0000.00721.90
8.3.00.0000.00817.75
8.2.180.0070.00716.63
8.2.170.0120.00322.96
8.2.160.0030.01020.52
8.2.150.0030.00724.18
8.2.140.0050.00324.66
8.2.130.0080.00020.36
8.2.120.0040.00426.35
8.2.110.0040.00421.03
8.2.100.0120.00018.22
8.2.90.0050.00319.05
8.2.80.0000.00818.05
8.2.70.0050.00517.63
8.2.60.0040.00418.05
8.2.50.0070.00319.78
8.2.40.0080.00020.59
8.2.30.0040.00421.18
8.2.20.0000.00718.04
8.2.10.0040.00417.94
8.2.00.0040.00418.11
8.1.280.0110.00425.92
8.1.270.0080.00023.80
8.1.260.0040.00426.35
8.1.250.0060.01228.09
8.1.240.0000.00923.80
8.1.230.0120.00317.42
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0050.00517.22
8.1.180.0040.00418.10
8.1.170.0050.00318.56
8.1.160.0040.00419.04
8.1.150.0000.00720.59
8.1.140.0000.00819.57
8.1.130.0030.00318.82
8.1.120.0080.00017.45
8.1.110.0040.00417.34
8.1.100.0040.00417.42
8.1.90.0000.00817.38
8.1.80.0000.00717.43
8.1.70.0070.00017.49
8.1.60.0090.00317.46
8.1.50.0000.00817.52
8.1.40.0040.00417.48
8.1.30.0060.00617.67
8.1.20.0000.00817.70
8.1.10.0000.00817.53
8.1.00.0050.00217.56
8.0.300.0070.00418.77
8.0.290.0000.00716.75
8.0.280.0070.00018.32
8.0.270.0030.00317.27
8.0.260.0060.00016.95
8.0.250.0040.00417.02
8.0.240.0040.00417.01
8.0.230.0000.00716.99
8.0.220.0030.00316.92
8.0.210.0030.00316.80
8.0.200.0060.00316.83
8.0.190.0000.00916.85
8.0.180.0040.00416.92
8.0.170.0050.00216.92
8.0.160.0070.00016.87
8.0.150.0040.00416.90
8.0.140.0000.00716.87
8.0.130.0030.00313.37
8.0.120.0040.00416.86
8.0.110.0040.00416.79
8.0.100.0050.00316.83
8.0.90.0040.00416.94
8.0.80.0180.00316.89
8.0.70.0050.00316.72
8.0.60.0000.00816.96
8.0.50.0000.00816.89
8.0.30.0080.00817.09
8.0.20.0140.01317.40
8.0.10.0000.00717.01
8.0.00.0130.00316.75
7.4.330.0000.00515.55
7.4.320.0000.00616.50
7.4.300.0030.00316.57
7.4.290.0030.00316.65
7.4.280.0030.00616.62
7.4.270.0030.00316.54
7.4.260.0050.00313.29
7.4.250.0000.00716.47
7.4.240.0040.00416.54
7.4.230.0070.00016.71
7.4.220.0160.01016.47
7.4.210.0070.00716.57
7.4.200.0000.00716.51
7.4.160.0090.00816.60
7.4.150.0110.00617.40
7.4.140.0100.01117.86
7.4.130.0100.00716.59
7.4.120.0070.01316.58
7.4.110.0100.01016.47
7.4.100.0100.01316.67
7.4.90.0120.00616.44
7.4.80.0090.00919.39
7.4.70.0170.00316.57
7.4.60.0030.01316.48
7.4.50.0080.01216.43
7.4.40.0100.00716.65
7.4.30.0070.01716.59
7.4.00.0060.01014.96
7.3.330.0030.00313.23
7.3.320.0030.00313.30
7.3.310.0030.00316.38
7.3.300.0000.00816.25
7.3.290.0030.00316.33
7.3.280.0100.00616.31
7.3.270.0040.01317.40
7.3.260.0130.00616.44
7.3.250.0130.00716.53
7.3.240.0050.01216.39
7.3.230.0130.01016.32
7.3.210.0060.01216.37
7.3.200.0100.00716.48
7.3.190.0170.00316.56
7.3.180.0040.01216.56
7.3.170.0130.00316.50
7.3.160.0060.01016.66
7.3.10.0030.00716.80
7.3.00.0100.00716.62
7.2.330.0060.01316.46
7.2.320.0080.00916.76
7.2.310.0070.01516.45
7.2.300.0060.01216.73
7.2.290.0080.01016.54
7.2.130.0170.00016.36
7.2.120.0040.00816.82
7.2.110.0110.00316.68
7.2.100.0050.00516.91
7.2.90.0160.00016.99
7.2.80.0070.00316.73
7.2.70.0190.00016.81
7.2.60.0130.00516.87
7.2.50.0130.00316.78
7.2.40.0060.00616.84
7.2.30.0070.00716.54
7.2.20.0040.01216.93
7.2.10.0130.00016.73
7.2.00.0070.00817.94
7.1.250.0100.00715.74
7.1.200.0060.00615.74
7.1.100.0550.01115.85
7.1.70.0060.01017.19
7.1.60.0160.01934.76
7.1.50.0250.00934.72
7.1.40.0160.01434.28
7.1.30.0180.01534.32
7.1.20.0220.01234.40
7.1.10.0000.01616.44
7.1.00.0080.00716.50
7.0.200.0060.01116.68
7.0.190.0050.01116.70
7.0.180.0000.01416.33
7.0.170.0080.00816.15
7.0.160.0060.00916.51
7.0.150.0040.01416.30
7.0.140.0040.01116.41
7.0.130.0020.01716.54
7.0.120.0020.00916.43
7.0.110.0040.01416.28
7.0.100.0060.01216.46
7.0.90.0030.01016.21
7.0.80.0040.00916.25
7.0.70.0040.01116.37
7.0.60.0070.00716.18
7.0.50.0080.01016.48
7.0.40.0130.00816.38
7.0.30.0070.01216.52
7.0.20.0090.01016.25
7.0.10.0060.01016.39
7.0.00.0110.00216.11

preferences:
46.45 ms | 401 KiB | 5 Q