3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new stdClass(); $y = new StdClass(); $x-> a = 10; $y->x = $x; $j = json_encode($y); $j2 = json_decode($j); var_dump($j2); var_dump((array) $j2); $j3 = json_decode($j, true); var_dump($j3);

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.4.10.0060.00319.55
8.3.140.0000.00716.70
8.3.130.0100.00016.54
8.3.120.0120.00619.25
8.3.110.0080.00420.94
8.3.100.0060.00324.06
8.3.90.0030.00526.77
8.3.80.0100.00018.43
8.3.70.0130.00618.15
8.3.60.0120.00918.31
8.3.50.0140.00718.53
8.3.40.0100.01022.09
8.3.30.0030.01021.74
8.3.20.0070.00724.18
8.3.10.0000.00824.66
8.3.00.0000.00726.16
8.2.250.0130.00016.59
8.2.240.0110.00016.99
8.2.230.0080.00022.58
8.2.220.0030.00637.54
8.2.210.0030.00626.77
8.2.200.0000.00918.29
8.2.190.0120.00616.58
8.2.180.0090.00918.29
8.2.170.0040.01118.65
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0000.00720.66
8.2.110.0060.01322.20
8.2.100.0060.01521.01
8.2.90.0210.01018.52
8.2.80.0280.00618.64
8.2.70.0130.00318.64
8.2.60.0080.00818.57
8.2.50.0080.00818.78
8.2.40.0090.00418.70
8.2.30.0200.00718.71
8.2.20.0130.00018.66
8.2.10.0110.00318.71
8.2.00.0200.00718.95
8.1.300.0030.00518.42
8.1.290.0030.00630.84
8.1.280.0120.00925.92
8.1.270.0080.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0140.00018.57
8.1.230.0210.00318.57
8.1.220.0190.00818.43
8.1.210.0060.00819.69
8.1.200.0210.00418.61
8.1.190.0090.00618.40
8.1.180.0040.01118.32
8.1.170.0110.00418.33
8.1.160.0100.00318.56
8.1.150.0090.00320.25
8.1.140.0170.00718.48
8.1.130.0080.00518.43
8.1.120.0120.00318.33
8.1.110.0110.00318.39
8.1.100.0150.00518.27
8.1.90.0100.00318.46
8.1.80.0090.00418.51
8.1.70.0090.00318.88
8.1.60.0160.00018.55
8.1.50.0150.00018.53
8.1.40.0110.00318.68
8.1.30.0060.00618.95
8.1.20.0060.00918.50
8.1.10.0040.00818.88
8.1.00.0100.00318.36
8.0.300.0160.00017.54
8.0.290.0110.00417.65
8.0.280.0080.00417.66
8.0.270.0110.00417.69
8.0.260.0120.00018.23
8.0.250.0140.00017.88
8.0.240.0100.00317.88
8.0.230.0040.00818.19
8.0.220.0110.00417.76
8.0.210.0140.00017.82
8.0.200.0080.00817.83
8.0.190.0080.00418.13
8.0.180.0100.00317.75
8.0.170.0090.00617.83
8.0.160.0150.00017.83
8.0.150.0100.00517.83
8.0.140.0150.00017.61
8.0.130.0040.00818.32
8.0.120.0110.00417.72
8.0.110.0120.01217.97
8.0.100.0240.00317.71
8.0.90.0230.00317.74
8.0.80.0150.00017.83
8.0.70.0110.00417.82
8.0.60.0100.00218.04
8.0.50.0110.00317.73
8.0.30.0060.00618.27
8.0.20.0100.00317.87
8.0.10.0140.00017.83

preferences:
39.13 ms | 403 KiB | 5 Q