3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $obj = new stdClass; $obj->foo = new stdClass; $obj->foo->baz = 'baz'; $obj->bar = 'bar'; $obj->foo->baz = new stdClass; $obj->foo->baz->test = 'baz test'; $obj->foo->baz->test = new stdClass; $obj->foo->baz->test->conket = 'baz test'; function objectToArray( $object ) { if( !is_object( $object ) && !is_array( $object ) ) { return $object; } if( is_object( $object ) ) { $object = get_object_vars( $object ); } return array_map( __FUNCTION__, $object ); } /*** convert the array to object ***/ $array = objectToArray( 'array()' ); /*** show the array ***/ print_r( $array );
based on eEtQm

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.00.0040.01519.46
7.1.100.0030.01018.07
7.1.70.0030.00717.13
7.1.60.0060.00619.59
7.1.50.0030.01316.93
7.1.00.0070.07022.44
7.0.200.0090.00614.64
7.0.60.0170.08721.81
7.0.50.0030.04717.88
7.0.40.0030.07320.04
7.0.30.0630.07020.26
7.0.20.0400.06320.17
7.0.10.0200.05720.15
7.0.00.0130.05020.22
5.6.280.0000.06020.87
5.6.210.0030.07720.69
5.6.200.0030.05318.22
5.6.190.0100.07320.52
5.6.180.3570.04320.64
5.6.170.0130.04320.48
5.6.160.0030.06020.50
5.6.150.0070.04718.19
5.6.140.0070.04018.24
5.6.130.0000.08718.28
5.6.120.0130.07720.99
5.6.110.0100.08021.12
5.6.100.0130.05020.96
5.6.90.0070.08321.01
5.6.80.0000.04020.52
5.5.350.0100.07720.42
5.5.340.0200.06718.05
5.5.330.0070.04020.31
5.5.320.0430.05320.42
5.5.310.0230.08020.27
5.5.300.0030.07718.07
5.5.290.0100.05318.03
5.5.280.0070.08020.80
5.5.270.0030.09020.77
5.5.260.0070.08720.88
5.5.250.0100.07720.68
5.5.240.0100.05320.28
5.4.450.0200.05319.66
5.4.440.0800.05719.25
5.4.430.0500.05019.61
5.4.420.0030.05719.36
5.4.410.0470.05719.49
5.4.400.0400.06319.22
5.4.390.0600.05719.29
5.4.380.0170.05019.29
5.4.370.0100.05318.86
5.4.360.0630.05019.23
5.4.350.0730.05019.29
5.4.340.0570.05719.31
5.4.320.0370.04719.31
5.4.310.0430.05319.21
5.4.300.0730.05019.25
5.4.290.0630.05719.20
5.4.280.0630.05318.86
5.4.270.0670.04719.08
5.4.260.0630.04019.08
5.4.250.0430.05318.86
5.4.240.0030.05318.86
5.4.230.0570.04719.18
5.4.220.0500.06019.22
5.4.210.0700.03719.00
5.4.200.0630.05016.67
5.4.190.0630.05018.96
5.4.180.0600.05019.19
5.4.170.0500.06018.92
5.4.160.0600.04719.05
5.4.150.0230.05319.04
5.4.140.0070.05016.31
5.4.130.0130.05716.29
5.4.120.0330.05316.46
5.4.110.0700.03716.41
5.4.100.0600.05016.62
5.4.90.0670.05716.25
5.4.80.0700.04716.23
5.4.70.0700.04716.23
5.4.60.0700.04316.22
5.4.50.0630.04316.52
5.4.40.0570.04716.54
5.4.30.0530.05016.40
5.4.20.0730.04716.34
5.4.10.0700.05316.28
5.4.00.0700.06015.93
5.3.290.0830.06014.71
5.3.280.0900.04314.50
5.3.270.0500.06314.58
5.3.260.0670.06014.46
5.3.250.0530.06014.56
5.3.240.0700.05714.61
5.3.230.0570.04714.64
5.3.220.0370.06314.56
5.3.210.0730.04714.64
5.3.200.0670.05714.71
5.3.190.0830.05014.68
5.3.180.0600.05014.62
5.3.170.0670.05014.47
5.3.160.0600.05714.48
5.3.150.0600.05714.48
5.3.140.0670.04714.48
5.3.130.0700.05014.55
5.3.120.0570.05314.54
5.3.110.0530.06714.52
5.3.100.0730.05714.20
5.3.90.0770.04313.95
5.3.80.0600.05313.98
5.3.70.0630.05313.99
5.3.60.0830.04314.01
5.3.50.0600.06013.81
5.3.40.0570.05714.12
5.3.30.0700.05013.91
5.3.20.0530.05713.65
5.3.10.0570.05713.73
5.3.00.0730.05013.80
5.2.170.0570.04711.23
5.2.160.0600.04311.13
5.2.150.0470.05011.16
5.2.140.0230.03711.22
5.2.130.0030.04311.11
5.2.120.0430.03711.22
5.2.110.0470.03711.05
5.2.100.0400.03710.96
5.2.90.0530.04011.05
5.2.80.0700.04311.24
5.2.70.0500.04011.04
5.2.60.0530.04011.00
5.2.50.0570.04010.95
5.2.40.0370.04711.16
5.2.30.0500.03710.95
5.2.20.0370.04010.87
5.2.10.0470.04010.79
5.2.00.0470.04310.86
5.1.60.0400.03710.00
5.1.50.0530.03710.00
5.1.40.0430.03710.04
5.1.30.0400.03710.26
5.1.20.0400.04010.40
5.1.10.0430.03310.07
5.1.00.0400.03710.13
5.0.50.0200.0378.69
5.0.40.0270.0278.34
5.0.30.0230.0438.12
5.0.20.0300.0278.25
5.0.10.0200.0278.02
5.0.00.0200.0408.30
4.4.90.0200.0205.79
4.4.80.0230.0175.86
4.4.70.0270.0175.93
4.4.60.0230.0235.77
4.4.50.0230.0175.75
4.4.40.0170.0375.89
4.4.30.0200.0205.74
4.4.20.0200.0235.91
4.4.10.0300.0205.94
4.4.00.0170.0375.89
4.3.110.0170.0275.80
4.3.100.0230.0235.70
4.3.90.0170.0235.84
4.3.80.0170.0335.84
4.3.70.0230.0175.65
4.3.60.0170.0235.68
4.3.50.0300.0175.68
4.3.40.0200.0405.61
4.3.30.0130.0204.42
4.3.20.0130.0204.44
4.3.10.0100.0204.39
4.3.00.0000.0237.24