3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ob = new stdClass(); $ob->value = new stdClass(); $array = array('1'); $obi = new stcClass(); $obi->0 = 1; $ob->value = (object)$array; $ob->val = $obi; print_r($ob); print_r(object_to_array($ob)); function object_to_array( $object ) { if( ! is_array( $object ) && ! is_object( $object )) { return $object; } if( is_object( $object )) { $object = get_object_vars( $object ); } return array_map( 'object_to_array', $object ); }

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)
5.4.180.0300.07019.08
5.4.170.0300.07319.03
5.4.160.0300.04319.20
5.4.150.0300.05718.98
5.4.140.0370.03716.33
5.4.130.0300.04016.36
5.4.120.0300.03716.34
5.4.110.0400.04316.46
5.4.100.0330.03716.36
5.4.90.0500.05316.51
5.4.80.0300.03716.56
5.4.70.0400.07016.59
5.4.60.0300.03716.33
5.4.50.0300.04016.56
5.4.40.0330.04316.50
5.4.30.0370.04316.42
5.4.20.0200.04016.34
5.4.10.0330.06716.48
5.4.00.0370.06715.81
5.3.270.0270.06714.46
5.3.260.0330.05314.46
5.3.250.0470.03314.70
5.3.240.0270.05314.54
5.3.230.0300.03714.44
5.3.220.0370.07014.42
5.3.210.0430.06714.43
5.3.200.0330.03714.43
5.3.190.0430.05714.42
5.3.180.0500.05714.59
5.3.170.0500.05714.41
5.3.160.0330.04014.42
5.3.150.0270.05014.59
5.3.140.0230.04314.51
5.3.130.0230.04014.46
5.3.120.0300.04314.48
5.3.110.0330.04314.60
5.3.100.0400.06013.89
5.3.90.0330.03713.88
5.3.80.0300.03713.97
5.3.70.0300.04713.97
5.3.60.0200.04714.10
5.3.50.0330.04313.92
5.3.40.0400.03713.86
5.3.30.0330.04713.77
5.3.20.0270.04313.64
5.3.10.0330.07013.61
5.3.00.0330.06013.73

preferences:
135.37 ms | 1398 KiB | 7 Q