3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @author: hakre <http://hakre.wordpress.com> * @link http://stackoverflow.com/a/17628617/367456 */ /** * dereference a value and optionally setting its type * * @param mixed $mixed * @param null $type (optional) * * @return mixed $mixed set as $type */ function rettype($mixed, $type = NULL) { $type === NULL || settype($mixed, $type); return $mixed; } $array = Array('status' => ['Figure A. ...' => ['regions' => ['321','324']]]); echo rettype($array, 'object')->status; // prints "Figure A. ..."

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.40.0140.00718.85
8.3.30.0090.00618.96
8.3.20.0070.00020.16
8.3.10.0000.00821.96
8.3.00.0000.00822.49
8.2.170.0070.01422.96
8.2.160.0070.00721.00
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0000.00726.16
8.2.120.0030.00619.48
8.2.110.0030.00622.12
8.2.100.0090.00419.64
8.2.90.0050.00219.08
8.2.80.0040.00417.97
8.2.70.0040.00417.38
8.2.60.0080.00017.80
8.2.50.0000.00818.07
8.2.40.0050.00218.21
8.2.30.0040.00418.06
8.2.20.0040.00417.54
8.2.10.0000.00817.72
8.2.00.0040.00417.74
8.1.270.0050.00321.84
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0050.00323.68
8.1.230.0070.00419.15
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0000.00917.36
8.1.190.0050.00317.30
8.1.180.0030.00618.61
8.1.170.0030.00618.64
8.1.160.0000.00722.01
8.1.150.0030.00518.64
8.1.140.0000.00717.33
8.1.130.0050.00217.72
8.1.120.0030.00317.50
8.1.110.0080.00017.39
8.1.100.0000.00817.36
8.1.90.0040.00417.41
8.1.80.0000.00817.47
8.1.70.0000.00817.45
8.1.60.0000.00817.48
8.1.50.0000.00717.55
8.1.40.0070.00017.57
8.1.30.0040.00417.71
8.1.20.0000.00817.74
8.1.10.0070.00017.50
8.1.00.0020.00517.48
8.0.300.0030.00318.77
8.0.290.0050.00217.15
8.0.280.0000.00818.53
8.0.270.0070.00017.18
8.0.260.0040.00416.95
8.0.250.0000.00816.99
8.0.240.0040.00417.05
8.0.230.0030.00316.99
8.0.220.0000.00716.94
8.0.210.0070.00016.95
8.0.200.0070.00017.01
8.0.190.0000.00717.00
8.0.180.0050.00516.89
8.0.170.0040.00416.98
8.0.160.0040.00416.90
8.0.150.0030.00316.97
8.0.140.0000.00716.95
8.0.130.0070.00013.40
8.0.120.0040.00416.85
8.0.110.0070.00016.88
8.0.100.0040.00416.84
8.0.90.0000.00816.85
8.0.80.0000.01417.01
8.0.70.0070.00016.98
8.0.60.0000.00716.77
8.0.50.0040.00416.95
8.0.30.0090.00917.12
8.0.20.0100.00917.40
8.0.10.0000.00817.12
8.0.00.0090.01016.89
7.4.330.0020.00215.02
7.4.320.0000.00716.59
7.4.300.0040.00416.51
7.4.290.0030.00316.42
7.4.280.0070.00016.65
7.4.270.0000.00716.59
7.4.260.0030.00316.52
7.4.250.0040.00416.43
7.4.240.0040.00416.47
7.4.230.0070.00016.49
7.4.220.0120.00616.46
7.4.210.0060.01116.58
7.4.200.0070.00016.72
7.4.190.0030.00316.47
7.4.160.0050.01116.56
7.4.150.0030.01317.40
7.4.140.0130.00917.86
7.4.130.0070.01016.68
7.4.120.0090.00716.62
7.4.110.0070.01016.55
7.4.100.0070.01116.54
7.4.90.0110.00716.58
7.4.80.0120.01219.39
7.4.70.0090.01216.48
7.4.60.0130.00316.48
7.4.50.0000.00816.39
7.4.40.0100.00322.77
7.4.30.0070.01416.64
7.4.00.0060.01114.89
7.3.330.0030.00313.35
7.3.320.0000.00613.13
7.3.310.0000.00716.42
7.3.300.0030.00316.37
7.3.290.0060.00916.42
7.3.280.0110.00916.41
7.3.270.0100.00717.40
7.3.260.0060.01116.38
7.3.250.0080.01016.61
7.3.240.0110.00616.61
7.3.230.0160.00616.43
7.3.210.0130.00616.37
7.3.200.0110.00519.39
7.3.190.0030.01516.51
7.3.180.0100.01016.35
7.3.170.0070.01416.46
7.3.160.0080.00816.36
7.3.120.0050.01314.85
7.3.110.0110.00715.02
7.3.100.0080.00414.97
7.3.90.0040.01114.79
7.3.80.0070.00714.72
7.3.70.0030.01614.86
7.3.60.0090.00614.79
7.3.50.0040.00414.83
7.3.40.0090.00614.79
7.3.30.0070.00714.57
7.3.20.0130.00616.65
7.3.10.0120.00616.69
7.3.00.0090.01016.71
7.2.330.0150.00416.41
7.2.320.0100.01016.59
7.2.310.0040.01716.81
7.2.300.0080.00816.69
7.2.290.0060.00916.75
7.2.250.0070.00715.20
7.2.240.0100.01014.98
7.2.230.0100.00315.23
7.2.220.0030.01314.84
7.2.210.0000.01314.91
7.2.200.0040.01215.04
7.2.190.0030.01214.89
7.2.180.0030.01014.85
7.2.170.0070.00715.07
7.2.130.0140.00716.80
7.2.120.0080.01016.92
7.2.110.0150.00316.87
7.2.100.0060.01316.68
7.2.90.0140.00516.57
7.2.80.0130.00416.73
7.2.70.0110.00316.60
7.2.60.0130.00616.66
7.2.50.0110.00716.67
7.2.40.0100.00416.69
7.2.30.0100.00616.63
7.2.20.0100.00616.54
7.2.10.0060.00916.49
7.2.00.0060.00817.64
7.1.330.0000.01615.87
7.1.320.0130.00015.45
7.1.310.0000.00915.58
7.1.300.0110.00015.81
7.1.290.0000.00915.68
7.1.280.0070.00715.66
7.1.270.0090.00915.57
7.1.260.0130.00315.60
7.1.250.0050.00615.53
7.1.70.0040.00417.15
7.1.60.0090.00317.32
7.1.50.0080.01516.91
7.1.00.0030.07722.40
7.0.200.0150.00616.73
7.0.140.0070.07021.95
7.0.60.0000.09019.93
7.0.50.0130.03717.84
7.0.40.0070.04020.30
7.0.30.0130.04720.25
7.0.20.0170.07720.23
7.0.10.0030.07320.07
7.0.00.0170.07720.08
5.6.280.0030.07321.10
5.6.210.0100.07020.49
5.6.200.0130.06718.28
5.6.190.0130.04020.61
5.6.180.0270.08020.48
5.6.170.0430.07320.39
5.6.160.0130.08020.54
5.6.150.0130.07718.14
5.6.140.0030.05018.18
5.6.130.0100.08718.13
5.6.120.0100.06320.80
5.6.110.0070.04021.05
5.6.100.0100.08321.14
5.6.90.0100.08021.04
5.6.80.0070.05720.51
5.5.350.0130.03720.36
5.5.340.0070.03717.98
5.5.330.0100.03720.56
5.5.320.0470.07020.32
5.5.310.0170.06320.37
5.5.300.0000.09018.02
5.5.290.0070.05018.05
5.5.280.0100.08720.87
5.5.270.0100.03720.86
5.5.260.0170.07020.87
5.5.250.0100.06320.69
5.5.240.0230.07720.16
5.4.450.0430.04719.48
5.4.440.0270.05019.32
5.4.430.1200.04019.55
5.4.420.0070.05719.52
5.4.410.0230.05018.96
5.4.400.0630.00018.89
5.4.390.0800.00018.62
5.4.380.0230.05718.78
5.4.370.0330.04718.75
5.4.360.0200.05718.64
5.4.350.0370.06018.50
5.4.340.0300.05318.80
5.4.320.0090.03212.50
5.4.310.0070.03812.50
5.4.300.0050.03812.50
5.4.290.0070.04412.50
5.4.280.0080.03412.40
5.4.270.0080.03412.40
5.4.260.0130.05319.05
5.4.250.0070.08719.02
5.4.240.0170.07018.99
5.4.230.0130.05719.00
5.4.220.0230.06318.79
5.4.210.0130.06318.72
5.4.200.0070.07718.95
5.4.190.0130.06019.05
5.4.180.0130.07018.70
5.4.170.0070.06318.83
5.4.160.0230.04318.96
5.4.150.0070.07018.90
5.4.140.0230.06016.31
5.4.130.0200.06316.39
5.4.120.0170.06316.34
5.4.110.0230.06716.34
5.4.100.0070.06716.36
5.4.90.0230.06316.51
5.4.80.0130.06316.50
5.4.70.0070.07716.47
5.4.60.0270.05716.46
5.4.50.0100.07716.58
5.4.40.0100.05716.54
5.4.30.0070.07716.62
5.4.20.0070.05016.49
5.4.10.0270.06016.49
5.4.00.0070.06016.01
5.3.290.0080.03812.80
5.3.280.0170.06014.68
5.3.270.0070.07714.74
5.3.260.0130.05014.67
5.3.250.0100.07014.50
5.3.240.0200.06014.46
5.3.230.0100.06014.59
5.3.220.0070.08014.55
5.3.210.0130.06014.64
5.3.200.0030.05714.63
5.3.190.0100.07714.64
5.3.180.0100.07314.58
5.3.170.0130.07314.63
5.3.160.0070.07714.53
5.3.150.0130.06014.74
5.3.140.0130.04714.68
5.3.130.0170.05714.77
5.3.120.0070.06714.77
5.3.110.0130.08014.71
5.3.100.0130.06314.11
5.3.90.0170.05714.10
5.3.80.0230.05714.00
5.3.70.0170.05314.02
5.3.60.0170.04713.98
5.3.50.0130.06714.02
5.3.40.0100.06313.93
5.3.30.0100.05713.88
5.3.20.0170.06313.91
5.3.10.0100.05713.82
5.3.00.0170.06713.66
5.2.170.0230.04711.04
5.2.160.0030.05011.21
5.2.150.0100.05011.22
5.2.140.0100.04711.20
5.2.130.0130.05711.18
5.2.120.0100.04311.27
5.2.110.0000.05311.10
5.2.100.0100.05311.18
5.2.90.0100.04011.00
5.2.80.0100.04711.30
5.2.70.0100.04011.26
5.2.60.0030.05311.13
5.2.50.0030.04311.20
5.2.40.0130.04310.99
5.2.30.0100.05010.97
5.2.20.0070.04311.04
5.2.10.0100.04310.69
5.2.00.0070.06010.72
5.1.60.0170.0309.93
5.1.50.0000.0579.95
5.1.40.0070.03710.04
5.1.30.0100.03310.43
5.1.20.0070.03710.43
5.1.10.0070.04310.31
5.1.00.0100.04710.04
5.0.50.0030.0338.60
5.0.40.0070.0408.33
5.0.30.0000.0508.31
5.0.20.0000.0378.34
5.0.10.0130.0338.41
5.0.00.0070.0408.13
4.4.90.0070.0237.54
4.4.80.0100.0237.54
4.4.70.0070.0277.54
4.4.60.0070.0237.54
4.4.50.0100.0237.54
4.4.40.0030.0477.54
4.4.30.0000.0277.54
4.4.20.0070.0277.54
4.4.10.0030.0207.54
4.4.00.0000.0437.54
4.3.110.0070.0207.54
4.3.100.0070.0307.54
4.3.90.0030.0277.54
4.3.80.0070.0377.54
4.3.70.0070.0207.54
4.3.60.0030.0307.54
4.3.50.0100.0137.54
4.3.40.0070.0407.54
4.3.30.0030.0307.54
4.3.20.0030.0237.54
4.3.10.0030.0237.54
4.3.00.0030.01713.28

preferences:
58.38 ms | 400 KiB | 5 Q