3v4l.org

run code in 300+ PHP versions simultaneously
<?php function e($o){return json_decode(preg_replace('/\\\u0000[*a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\\u0000/','',json_encode((array)$o)),1);} class Foo { public function test() { echo 'test'; } } function changeMe(&$obj) { $obj = function(){ }; //$reflectionClass = new ReflectionClass($obj); //var_dump($reflectionClass); $arr = (array) $obj; $out = json_encode($arr); $out = preg_replace('/\\\u0000[*a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\\u0000/', '', $out); $newArray = json_decode($out, true); var_dump($arr, $newArray); } $foo = new Foo(); var_dump($foo); changeMe($foo); $foo->test();

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.70.0090.00916.88
8.3.60.0120.00318.37
8.3.50.0090.00921.14
8.3.40.0120.00319.02
8.3.30.0140.00319.18
8.3.20.0000.00720.21
8.3.10.0080.00022.10
8.3.00.0030.00522.52
8.2.180.0120.00317.13
8.2.170.0040.01122.96
8.2.160.0030.01019.34
8.2.150.0090.00024.18
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0030.00519.64
8.2.110.0050.00520.89
8.2.100.0060.00617.97
8.2.90.0060.00319.23
8.2.80.0090.00017.97
8.2.70.0040.00417.75
8.2.60.0040.00418.04
8.2.50.0030.00618.10
8.2.40.0110.00018.05
8.2.30.0080.00018.18
8.2.20.0080.00017.78
8.2.10.0030.00617.95
8.2.00.0090.00017.99
8.1.280.0120.00625.92
8.1.270.0000.00822.31
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00622.62
8.1.230.0080.00420.34
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0030.00617.47
8.1.190.0040.00417.60
8.1.180.0080.00018.10
8.1.170.0000.00918.80
8.1.160.0040.00422.11
8.1.150.0000.00718.72
8.1.140.0050.00217.73
8.1.130.0000.00717.88
8.1.120.0000.00717.63
8.1.110.0000.00817.67
8.1.100.0000.00717.61
8.1.90.0040.00417.54
8.1.80.0080.00017.68
8.1.70.0050.00217.57
8.1.60.0000.00917.64
8.1.50.0080.00017.65
8.1.40.0070.00017.73
8.1.30.0000.00717.79
8.1.20.0050.00317.89
8.1.10.0030.00517.66
8.1.00.0080.00017.68
8.0.300.0080.00018.77
8.0.290.0000.00716.88
8.0.280.0040.00418.47
8.0.270.0050.00217.15
8.0.260.0000.00716.94
8.0.250.0040.00417.02
8.0.240.0000.00917.05
8.0.230.0000.00717.12
8.0.220.0030.00317.05
8.0.210.0030.00316.95
8.0.200.0060.00017.07
8.0.190.0060.00317.24
8.0.180.0040.00417.17
8.0.170.0000.00817.20
8.0.160.0050.00317.23
8.0.150.0040.00417.10
8.0.140.0050.00317.09
8.0.130.0030.00313.54
8.0.120.0030.00517.09
8.0.110.0050.00317.11
8.0.100.0070.00017.14
8.0.90.0000.00817.16
8.0.80.0150.00017.00
8.0.70.0040.00417.06
8.0.60.0000.00817.10
8.0.50.0070.00017.18
8.0.30.0120.00717.42
8.0.20.0100.00817.40
8.0.10.0070.00017.11
8.0.00.0130.01016.93
7.4.330.0000.00515.00
7.4.320.0060.00016.81
7.4.300.0030.00316.87
7.4.290.0030.00316.75
7.4.280.0080.00016.71
7.4.270.0030.00316.73
7.4.260.0030.00316.82
7.4.250.0000.00816.82
7.4.240.0020.00516.82
7.4.230.0040.00416.93
7.4.220.0130.01016.86
7.4.210.0050.00916.76
7.4.200.0030.00316.80
7.4.190.0050.00216.79
7.4.160.0040.01816.64
7.4.150.0110.01217.40
7.4.140.0120.00917.86
7.4.130.0120.00916.76
7.4.120.0090.00916.81
7.4.110.0070.01016.76
7.4.100.0030.01416.81
7.4.90.0070.01116.82
7.4.80.0070.01419.39
7.4.70.0160.00016.50
7.4.60.0070.01016.71
7.4.50.0000.00916.69
7.4.40.0080.00322.77
7.4.30.0100.00716.79
7.4.00.0130.00715.05
7.3.330.0000.00513.48
7.3.320.0000.00513.50
7.3.310.0000.00816.56
7.3.300.0030.00516.39
7.3.290.0130.00716.51
7.3.280.0090.00816.54
7.3.270.0140.00317.40
7.3.260.0060.01516.50
7.3.250.0130.00516.55
7.3.240.0120.00616.69
7.3.230.0140.00816.70
7.3.210.0070.01016.82
7.3.200.0100.00619.39
7.3.190.0110.00616.63
7.3.180.0070.01016.58
7.3.170.0060.00916.56
7.3.160.0080.00816.82
7.3.120.0060.00914.91
7.3.110.0060.01314.79
7.3.100.0110.00315.10
7.3.90.0090.00314.96
7.3.80.0030.01014.61
7.3.70.0090.00014.91
7.3.60.0070.01015.10
7.3.50.0030.01615.08
7.3.40.0030.01314.82
7.3.30.0060.00914.81
7.3.20.0060.00616.72
7.3.10.0080.00616.43
7.3.00.0060.00916.68
7.2.330.0120.00616.95
7.2.320.0090.01216.86
7.2.310.0060.01316.80
7.2.300.0080.01416.71
7.2.290.0080.00916.91
7.2.250.0070.01015.17
7.2.240.0130.00615.37
7.2.230.0000.01615.22
7.2.220.0030.01315.13
7.2.210.0100.00615.30
7.2.200.0030.01015.23
7.2.190.0110.00715.33
7.2.180.0060.00915.18
7.2.170.0070.01015.06
7.2.160.0030.01015.28
7.2.150.0130.00316.96
7.2.140.0070.01016.84
7.2.130.0110.00616.91
7.2.120.0050.01116.86
7.2.110.0120.00516.81
7.2.100.0120.00716.83
7.2.90.0110.00516.95
7.2.80.0090.00816.91
7.2.70.0100.01016.79
7.2.60.0100.00716.92
7.2.50.0110.01016.89
7.2.40.0110.00816.97
7.2.30.0130.00716.89
7.2.20.0090.00616.75
7.2.10.0060.01116.88
7.2.00.0080.00917.75
7.1.330.0060.00815.61
7.1.320.0000.01515.80
7.1.310.0070.01015.44
7.1.300.0040.01115.91
7.1.290.0040.01115.98
7.1.280.0110.00716.01
7.1.270.0040.00815.69
7.1.260.0120.00615.82
7.1.250.0090.01015.78
7.1.200.0050.00815.68
7.1.100.0100.00318.28
7.1.70.0030.00917.37
7.1.60.0160.00619.82
7.1.50.0090.01517.16
7.1.00.0070.03022.26
7.0.200.0030.00616.80
7.0.140.0000.08021.95
7.0.90.0100.06319.89
7.0.80.0100.06319.85
7.0.70.0430.07719.82
7.0.60.0570.06719.84
7.0.50.0570.07320.25
7.0.40.0100.04320.13
7.0.30.0200.07320.12
7.0.20.0030.04320.08
7.0.10.0100.08019.99
7.0.00.0130.07720.07
5.6.280.0070.07320.79
5.6.230.0070.07020.55
5.6.220.0130.03720.52
5.6.210.0070.08020.43
5.6.200.0100.08020.95
5.6.190.0170.07020.96
5.6.180.0030.08720.94
5.6.170.0000.05721.02
5.6.160.0130.07021.11
5.6.150.0100.07721.06
5.6.140.0100.04320.98
5.6.130.0070.08021.14
5.6.120.0100.08021.02
5.6.110.0130.07320.91
5.6.100.0130.07720.95
5.6.90.0100.08721.03
5.6.80.0070.08320.43
5.6.70.0070.08320.32
5.6.60.0100.04020.42
5.6.50.0000.08720.32
5.6.40.0130.04320.31
5.6.30.0070.08020.45
5.6.20.0070.05020.39
5.6.10.0070.08320.32
5.6.00.0200.06720.42
5.5.370.0130.05020.31
5.5.360.0100.07720.31
5.5.350.0070.08020.34
5.5.340.0100.09020.90
5.5.330.0230.06720.81
5.5.320.0130.07720.78
5.5.310.0070.04320.93
5.5.300.0000.05720.91
5.5.290.0030.08720.81
5.5.280.0070.08320.65
5.5.270.0100.07320.86
5.5.260.0100.08320.88
5.5.250.0030.08720.69
5.5.240.0100.08020.20
5.5.230.0100.06020.19
5.5.220.0230.06320.21
5.5.210.0200.05720.21
5.5.200.0070.08020.09
5.5.190.0030.05320.23
5.5.180.0070.07720.27
5.5.160.0130.04720.12
5.5.150.0030.05720.18
5.5.140.0070.06720.00
5.5.130.0100.05720.16
5.5.120.0070.05020.29
5.5.110.0130.06719.99
5.5.100.0130.07020.06
5.5.90.0100.06720.12
5.5.80.0030.07720.08
5.5.70.0030.08020.13
5.5.60.0170.07319.94
5.5.50.0170.08020.09
5.5.40.0100.04020.07
5.5.30.0100.05720.15
5.5.20.0130.06019.96
5.5.10.0030.04719.97
5.5.00.0070.06719.96
5.4.450.0170.06719.38
5.4.440.0100.07719.51
5.4.430.0030.08319.37
5.4.420.0100.05019.23
5.4.410.0030.04719.04
5.4.400.0070.04318.91
5.4.390.0100.06719.13
5.4.380.0200.03018.85
5.4.370.0130.06319.14
5.4.360.0100.06319.18
5.4.350.0070.07719.04
5.4.340.0200.06719.13
5.4.320.0070.06319.23
5.4.310.0070.07318.84
5.4.300.0030.05018.89
5.4.290.0200.06319.05
5.4.280.0170.07019.12
5.4.270.0130.07318.96
5.4.260.0070.04319.16
5.4.250.0070.05319.20
5.4.240.0070.07719.11
5.4.230.0130.07719.02
5.4.220.0030.06719.04
5.4.210.0130.04719.22
5.4.200.0100.05319.13
5.4.190.0030.04718.93
5.4.180.0030.08319.02
5.4.170.0070.05319.04
5.4.160.0070.07319.16
5.4.150.0030.09319.01
5.4.140.0100.06016.29
5.4.130.0130.06016.36
5.4.120.0130.06716.37
5.4.110.0070.07016.42
5.4.100.0030.06316.42
5.4.90.0170.06016.51
5.4.80.0030.07316.43
5.4.70.0070.07016.53
5.4.60.0100.07016.45
5.4.50.0000.07316.42
5.4.40.0130.06316.45
5.4.30.0070.07316.47
5.4.20.0030.06016.32
5.4.10.0070.05016.47
5.4.00.0030.07715.85
5.3.290.0070.04314.74
5.3.280.0070.05714.57
5.3.270.0000.07014.57
5.3.260.0170.03714.64
5.3.250.0100.04014.55
5.3.240.0000.08314.57
5.3.230.0070.07314.67
5.3.220.0070.06314.68
5.3.210.0100.08014.63
5.3.200.0070.05014.53
5.3.190.0070.05014.54
5.3.180.0030.07314.68
5.3.170.0030.05314.69
5.3.160.0170.03314.55
5.3.150.0100.06014.63
5.3.140.0070.07014.66
5.3.130.0070.08314.62
5.3.120.0100.07714.61
5.3.110.0100.07014.58
5.3.100.0070.06714.00
5.3.90.0100.03714.06
5.3.80.0030.08013.93
5.3.70.0030.05714.13
5.3.60.0100.07714.04
5.3.50.0130.06314.02
5.3.40.0030.06713.94
5.3.30.0030.03713.85
5.3.20.0000.05713.68
5.3.10.0130.06713.78
5.3.00.0070.04313.66
5.2.170.0130.05311.05
5.2.160.0030.07011.28
5.2.150.0000.04311.03
5.2.140.0070.02711.23
5.2.130.0030.04011.21
5.2.120.0030.03311.09
5.2.110.0100.05311.19
5.2.100.0030.05311.00
5.2.90.0070.03711.16
5.2.80.0100.06711.00
5.2.70.0100.06011.16
5.2.60.0000.06711.16
5.2.50.0100.02311.08
5.2.40.0070.06011.02
5.2.30.0070.05710.96
5.2.20.0100.04311.10
5.2.10.0100.05711.01
5.2.00.0070.05710.75
5.1.60.0070.0479.99
5.1.50.0030.03010.10
5.1.40.0030.0309.82
5.1.30.0000.03310.33
5.1.20.0030.05710.50
5.1.10.0000.04310.15
5.1.00.0030.05310.14
5.0.50.0030.0378.60
5.0.40.0100.0238.41
5.0.30.0070.0608.28
5.0.20.0030.0338.20
5.0.10.0070.0508.28
5.0.00.0030.0338.25
4.4.90.0030.0237.28
4.4.80.0030.0177.28
4.4.70.0000.0377.28
4.4.60.0000.0377.28
4.4.50.0030.0407.28
4.4.40.0030.0307.28
4.4.30.0000.0207.28
4.4.20.0000.0277.28
4.4.10.0030.0377.28
4.4.00.0030.0477.28
4.3.110.0000.0407.28
4.3.100.0070.0277.28
4.3.90.0000.0507.28
4.3.80.0030.0507.28
4.3.70.0000.0277.28
4.3.60.0070.0307.28
4.3.50.0000.0377.28
4.3.40.0030.0377.28
4.3.30.0030.0277.28
4.3.20.0070.0307.28
4.3.10.0000.0377.28
4.3.00.0000.0307.28

preferences:
48.77 ms | 401 KiB | 5 Q