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; $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.0090.00616.50
8.3.50.0070.01116.48
8.3.40.0040.01118.70
8.3.30.0120.00318.75
8.3.20.0030.00520.16
8.3.10.0030.00523.47
8.3.00.0040.00417.78
8.2.180.0080.00816.34
8.2.170.0150.00022.96
8.2.160.0000.01420.34
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0020.00520.36
8.2.120.0040.00426.35
8.2.110.0090.00419.21
8.2.100.0070.00418.22
8.2.90.0000.00819.21
8.2.80.0090.00017.97
8.2.70.0050.00517.48
8.2.60.0000.00818.05
8.2.50.0070.00318.10
8.2.40.0040.00420.32
8.2.30.0080.00020.97
8.2.20.0000.00718.13
8.2.10.0040.00418.20
8.2.00.0040.00418.13
8.1.280.0070.00725.92
8.1.270.0050.00323.88
8.1.260.0000.00726.35
8.1.250.0070.01028.09
8.1.240.0030.00623.92
8.1.230.0030.01017.58
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00717.25
8.1.190.0160.00017.00
8.1.180.0050.00218.10
8.1.170.0040.00418.51
8.1.160.0040.00419.08
8.1.150.0040.00420.71
8.1.140.0050.00221.36
8.1.130.0030.00318.89
8.1.120.0060.00317.51
8.1.110.0000.00717.50
8.1.100.0000.00917.35
8.1.90.0000.00717.49
8.1.80.0000.00817.38
8.1.70.0030.00317.42
8.1.60.0060.00317.59
8.1.50.0000.00717.52
8.1.40.0040.00417.54
8.1.30.0050.00517.68
8.1.20.0000.00817.52
8.1.10.0000.00817.55
8.1.00.0040.00417.40
8.0.300.0060.00318.77
8.0.290.0000.00716.75
8.0.280.0070.00018.32
8.0.270.0000.00717.25
8.0.260.0000.00616.87
8.0.250.0080.00017.03
8.0.240.0000.00716.93
8.0.230.0040.00416.96
8.0.220.0030.00316.85
8.0.210.0000.00716.78
8.0.200.0000.00716.90
8.0.190.0030.00616.85
8.0.180.0000.00816.94
8.0.170.0040.00416.86
8.0.160.0050.00316.90
8.0.150.0040.00416.77
8.0.140.0030.00316.85
8.0.130.0050.00013.29
8.0.120.0000.00716.86
8.0.110.0040.00416.73
8.0.100.0040.00416.71
8.0.90.0070.00016.97
8.0.80.0100.00716.84
8.0.70.0080.00016.96
8.0.60.0070.00016.75
8.0.50.0050.00216.89
8.0.30.0120.00517.12
8.0.20.0070.01417.40
8.0.10.0000.00717.04
8.0.00.0100.01016.80
7.4.330.0000.00515.55
7.4.320.0000.00616.50
7.4.300.0000.00616.59
7.4.290.0040.00416.50
7.4.280.0030.00516.54
7.4.270.0000.00716.64
7.4.260.0030.00313.31
7.4.250.0030.00316.48
7.4.240.0000.00716.55
7.4.230.0000.00716.36
7.4.220.0110.01116.56
7.4.210.0050.01016.43
7.4.200.0000.00716.50
7.4.160.0110.00616.56
7.4.150.0130.00617.40
7.4.140.0080.01117.86
7.4.130.0070.01716.66
7.4.120.0100.01116.52
7.4.110.0100.00716.54
7.4.100.0150.00316.42
7.4.90.0080.00816.49
7.4.80.0100.00619.39
7.4.70.0060.01516.52
7.4.60.0130.00316.66
7.4.50.0060.00616.52
7.4.40.0200.00016.20
7.4.30.0100.00716.47
7.4.10.0040.01415.28
7.4.00.0070.00915.38
7.3.330.0050.00013.12
7.3.320.0030.00313.24
7.3.310.0000.00716.36
7.3.300.0000.00716.26
7.3.290.0030.00316.28
7.3.280.0070.00816.27
7.3.270.0040.01917.40
7.3.260.0080.00916.30
7.3.250.0110.00716.43
7.3.240.0080.00916.38
7.3.230.0090.00916.58
7.3.210.0060.01016.26
7.3.200.0140.00716.19
7.3.190.0160.00016.58
7.3.180.0130.00316.49
7.3.170.0040.01416.33
7.3.160.0040.01216.48
7.3.130.0090.00915.21
7.3.120.0100.00715.31
7.3.110.0110.00415.18
7.3.100.0080.00615.35
7.3.90.0060.00915.16
7.3.80.0040.01315.28
7.3.70.0080.00515.16
7.3.60.0080.00715.18
7.3.50.0060.00715.12
7.3.40.0080.00815.26
7.3.30.0070.00615.29
7.3.20.0080.00617.15
7.3.10.0060.01017.10
7.3.00.0040.01017.04
7.2.330.0090.00916.87
7.2.320.0070.01016.57
7.2.310.0000.01816.33
7.2.300.0060.01616.40
7.2.290.0130.01016.65
7.2.260.0040.01415.50
7.2.250.0080.01015.38
7.2.240.0070.00915.35
7.2.230.0050.00915.41
7.2.220.0020.01315.62
7.2.210.0060.01115.39
7.2.200.0070.00815.53
7.2.190.0060.00915.45
7.2.180.0060.00715.44
7.2.170.0050.01015.50
7.2.160.0100.00615.50
7.2.150.0090.00617.36
7.2.140.0060.00717.38
7.2.130.0080.00817.13
7.2.120.0090.00417.29
7.2.110.0060.00917.21
7.2.100.0070.01017.24
7.2.90.0040.01017.26
7.2.80.0060.01217.39
7.2.70.0060.00717.32
7.2.60.0060.00717.12
7.2.50.0020.00917.29
7.2.40.0060.00717.08
7.2.30.0080.00517.21
7.2.20.0060.00817.13
7.2.10.0050.00817.21
7.2.00.0020.01217.52
7.1.330.0050.01116.17
7.1.320.0060.01016.32
7.1.310.0050.00916.28
7.1.300.0050.01016.32
7.1.290.0050.01116.16
7.1.280.0030.01116.28
7.1.270.0040.00916.34
7.1.260.0060.00916.27
7.1.250.0070.00816.22
7.1.240.0040.01116.12
7.1.230.0040.01216.27
7.1.220.0080.00616.15
7.1.210.0070.00916.25
7.1.200.0020.01116.14
7.1.190.0040.00816.18
7.1.180.0030.00816.17
7.1.170.0070.00716.25
7.1.160.0060.00816.09
7.1.150.0030.00816.25
7.1.140.0070.00516.35
7.1.130.0020.00916.11
7.1.120.0030.01116.25
7.1.110.0060.00516.07
7.1.100.0040.00916.65
7.1.90.0020.00916.33
7.1.80.0070.00816.37
7.1.70.0060.00516.44
7.1.60.0020.00916.49
7.1.50.0020.01116.44
7.1.40.0030.01116.46
7.1.30.0100.00416.50
7.1.20.0040.00916.34
7.1.10.0050.00816.28
7.1.00.0050.00716.49
7.0.330.0040.00615.91
7.0.320.0070.00815.78
7.0.310.0020.00916.00
7.0.300.0080.00716.04
7.0.290.0040.01015.83
7.0.280.0020.01015.88
7.0.270.0040.00915.84
7.0.260.0030.01015.93
7.0.250.0080.00616.04
7.0.240.0060.00715.98
7.0.230.0040.00915.97
7.0.220.0060.00615.92
7.0.210.0040.00916.06
7.0.200.0050.00816.00
7.0.190.0070.00616.27
7.0.180.0040.00816.05
7.0.170.0070.00616.12
7.0.160.0040.00916.08
7.0.150.0060.00816.06
7.0.140.0040.00716.13
7.0.130.0050.00816.26
7.0.120.0030.00916.17
7.0.110.0040.00716.21
7.0.100.0040.01016.25
7.0.90.0070.00616.17
7.0.80.0020.00716.17
7.0.70.0070.00316.04
7.0.60.0020.00916.08
7.0.50.0080.00516.17
7.0.40.0040.00814.71
7.0.30.0020.01014.75
7.0.20.0030.00814.69
7.0.10.0050.00614.71
7.0.00.0040.00814.74
5.6.400.0060.00614.88
5.6.390.0010.01014.77
5.6.380.0100.00614.89
5.6.370.0030.01014.98
5.6.360.0030.01114.84
5.6.350.0050.00814.96
5.6.340.0060.00715.05
5.6.330.0060.00414.97
5.6.320.0080.00614.90
5.6.310.0080.00714.72
5.6.300.0040.01214.86
5.6.290.0070.00714.85
5.6.280.0030.00914.88
5.6.270.0060.00414.90
5.6.260.0090.00714.78
5.6.250.0040.01114.94
5.6.240.0030.00814.76
5.6.230.0060.00615.01
5.6.220.0040.00814.94
5.6.210.0040.01115.00
5.6.200.0060.00714.77
5.6.190.0090.00314.83
5.6.180.0050.00614.89
5.6.170.0080.00514.94
5.6.160.0010.01214.97
5.6.150.0030.00914.96
5.6.140.0000.00914.93
5.6.130.0080.00414.90
5.6.120.0080.00414.99
5.6.110.0040.00814.89
5.6.100.0090.00714.94
5.6.90.0050.01114.77
5.6.80.0040.00914.70
5.6.70.0070.00914.72
5.6.60.0050.00715.01
5.6.50.0050.00814.76
5.6.40.0070.00714.84
5.6.30.0080.00514.68
5.6.20.0060.00614.94
5.6.10.0070.00614.90
5.6.00.0070.00814.84

preferences:
41.02 ms | 400 KiB | 5 Q