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($arrayFoo); $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.60.0060.00918.80
8.3.50.0120.00821.08
8.3.40.0070.00719.22
8.3.30.0070.00718.92
8.3.20.0060.00319.02
8.3.10.0040.00421.28
8.3.00.0040.00421.95
8.2.180.0120.00317.13
8.2.170.0180.00322.96
8.2.160.0070.00720.43
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00319.15
8.2.110.0070.00320.38
8.2.100.0030.00918.03
8.2.90.0050.00318.94
8.2.80.0060.00317.97
8.2.70.0040.00417.88
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0030.00618.16
8.2.30.0040.00421.18
8.2.20.0030.00617.90
8.2.10.0050.00318.05
8.2.00.0070.00417.88
8.1.270.0030.00523.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.01022.37
8.1.230.0060.00620.99
8.1.220.0000.00818.77
8.1.210.0000.00819.04
8.1.200.0060.00317.47
8.1.190.0060.00319.30
8.1.180.0030.00518.10
8.1.170.0080.00018.70
8.1.160.0000.00718.94
8.1.150.0040.00418.88
8.1.140.0040.00417.67
8.1.130.0070.00017.91
8.1.120.0050.00317.66
8.1.110.0040.00417.66
8.1.100.0000.00817.60
8.1.90.0040.00417.63
8.1.80.0030.00617.63
8.1.70.0030.00317.52
8.1.60.0030.00617.79
8.1.50.0040.00417.60
8.1.40.0000.00717.67
8.1.30.0030.00517.88
8.1.20.0000.00817.77
8.1.10.0000.00717.79
8.1.00.0080.00017.75
8.0.300.0060.00319.93
8.0.290.0000.00817.05
8.0.280.0040.00418.41
8.0.270.0000.00717.15
8.0.260.0030.00316.99
8.0.250.0040.00417.12
8.0.240.0040.00417.01
8.0.230.0000.00817.16
8.0.220.0000.00717.04
8.0.210.0070.00017.10
8.0.200.0030.00317.14
8.0.190.0070.00017.09
8.0.180.0000.00717.02
8.0.170.0040.00417.16
8.0.160.0040.00417.16
8.0.150.0040.00416.96
8.0.140.0050.00317.06
8.0.130.0000.00513.58
8.0.120.0000.00717.05
8.0.110.0040.00417.12
8.0.100.0050.00317.13
8.0.90.0000.00816.95
8.0.80.0100.01017.07
8.0.70.0000.00716.95
8.0.60.0000.00817.11
8.0.50.0000.00716.96
8.0.30.0060.01317.33
8.0.20.0100.01017.46
8.0.10.0000.00817.20
8.0.00.0080.00916.90
7.4.330.0060.00016.72
7.4.320.0030.00316.84
7.4.300.0000.00616.82
7.4.290.0000.00716.72
7.4.280.0040.00416.86
7.4.270.0070.00016.64
7.4.260.0030.00313.50
7.4.250.0030.00516.71
7.4.240.0030.00316.75
7.4.230.0070.00016.65
7.4.220.0070.01316.86
7.4.210.0090.00716.87
7.4.200.0000.00716.81
7.4.190.0080.00016.70
7.4.160.0070.01016.71
7.4.150.0070.01717.40
7.4.140.0090.01117.86
7.4.130.0110.00816.79
7.4.120.0110.00816.72
7.4.110.0060.01216.71
7.4.100.0090.00916.84
7.4.90.0060.01216.78
7.4.80.0110.01119.39
7.4.70.0080.00816.74
7.4.60.0110.01116.91
7.4.50.0090.00016.88
7.4.40.0060.01022.77
7.4.30.0080.00816.66
7.4.00.0100.00614.96
7.3.330.0050.00013.48
7.3.320.0050.00013.39
7.3.310.0040.00416.40
7.3.300.0070.00016.39
7.3.290.0120.00616.54
7.3.280.0090.00716.48
7.3.270.0130.00417.40
7.3.260.0130.00718.24
7.3.250.0070.01316.56
7.3.240.0140.00316.55
7.3.230.0100.01016.52
7.3.210.0100.00716.66
7.3.200.0150.00819.39
7.3.190.0100.00716.59
7.3.180.0150.00316.64
7.3.170.0140.00716.59
7.3.160.0130.00316.54
7.3.120.0110.00715.14
7.2.330.0080.00816.86
7.2.320.0090.00816.84
7.2.310.0110.00816.85
7.2.300.0090.00916.95
7.2.290.0040.01216.63
7.2.60.0040.00717.14
7.2.00.0030.00919.68
7.1.200.0110.00015.68
7.1.100.0030.00918.13
7.1.70.0000.00717.34
7.1.60.0100.01019.40
7.1.50.0040.01816.80
7.1.00.0030.03722.47
7.0.200.0040.00417.01
7.0.140.0070.07322.18
7.0.90.0630.08719.99
7.0.80.0670.06020.00
7.0.70.0530.08319.93
7.0.60.0470.09019.93
7.0.50.0670.07320.35
7.0.40.0100.08020.11
7.0.30.0130.07720.15
7.0.20.0100.03720.09
7.0.10.0100.08020.16
7.0.00.0030.08320.13
5.6.280.0070.07021.07
5.6.240.0000.05320.57
5.6.230.0100.06720.62
5.6.220.0070.04720.61
5.6.210.0070.08020.59
5.6.200.0070.07721.03
5.6.190.0100.07321.04
5.6.180.0130.07721.03
5.6.170.0130.07721.17
5.6.160.0130.08021.05
5.6.150.0030.08021.03
5.6.140.0070.08321.04
5.6.130.0170.07021.14
5.6.120.0170.07321.04
5.6.110.0030.07721.04
5.6.100.0070.08320.99
5.6.90.0130.07321.00
5.6.80.0070.04320.34
5.6.70.0170.06720.41
5.6.60.0130.07720.49
5.6.50.0100.08320.34
5.6.40.0070.07720.45
5.6.30.0070.08020.36
5.6.20.0070.04720.44
5.6.10.0030.05320.37
5.6.00.0170.06320.37
5.5.380.0100.04020.42
5.5.370.0200.07320.39
5.5.360.0130.06720.56
5.5.350.0030.08020.48
5.5.340.0130.08320.93
5.5.330.0030.04720.90
5.5.320.0170.07320.64
5.5.310.0030.05320.92
5.5.300.0100.07320.84
5.5.290.0030.06320.89
5.5.280.0130.06720.79
5.5.270.0030.08720.86
5.5.260.0000.07020.88
5.5.250.0200.07320.59
5.5.240.0130.07320.31
5.5.230.0070.04720.30
5.5.220.0070.08020.18
5.5.210.0200.07020.23
5.5.200.0100.07319.98
5.5.190.0070.07720.23
5.5.180.0070.07720.29
5.5.160.0030.07720.00
5.5.150.0070.05320.28
5.5.140.0130.07020.13
5.5.130.0100.04020.28
5.5.120.0030.05020.18
5.5.110.0030.06319.99
5.5.100.0030.08020.19
5.5.90.0030.08320.05
5.5.80.0130.05719.94
5.5.70.0070.08320.05
5.5.60.0070.04719.92
5.5.50.0030.07720.06
5.5.40.0130.05319.98
5.5.30.0030.04320.16
5.5.20.0000.05020.14
5.5.10.0030.08020.01
5.5.00.0200.06320.04
5.4.450.0030.05019.37
5.4.440.0030.05719.22
5.4.430.0070.06019.41
5.4.420.0030.07319.45
5.4.410.0200.06319.24
5.4.400.0100.04019.17
5.4.390.0130.07019.21
5.4.380.0130.07318.94
5.4.370.0100.05018.89
5.4.360.0070.07019.16
5.4.350.0000.08019.04
5.4.340.0070.06319.16
5.4.320.0000.08319.12
5.4.310.0030.05318.93
5.4.300.0000.08019.12
5.4.290.0070.07319.14
5.4.280.0130.07019.04
5.4.270.0070.07719.16
5.4.260.0100.07319.02
5.4.250.0300.05019.10
5.4.240.0170.06019.20
5.4.230.0030.05019.22
5.4.220.0030.07319.20
5.4.210.0130.05719.03
5.4.200.0070.07719.13
5.4.190.0070.07319.03
5.4.180.0070.07319.02
5.4.170.0000.08318.93
5.4.160.0030.07018.96
5.4.150.0030.07719.17
5.4.140.0100.06716.42
5.4.130.0070.06716.43
5.4.120.0030.05716.25
5.4.110.0100.06316.56
5.4.100.0000.08016.43
5.4.90.0130.06316.45
5.4.80.0070.05016.42
5.4.70.0130.03316.51
5.4.60.0200.06016.40
5.4.50.0130.06716.43
5.4.40.0070.07016.45
5.4.30.0170.06016.40
5.4.20.0070.03716.40
5.4.10.0100.06316.30
5.4.00.0070.07015.81
5.3.290.0200.07014.76
5.3.280.0030.08014.71
5.3.270.0070.07714.59
5.3.260.0000.06014.61
5.3.250.0030.07314.63
5.3.240.0030.04714.61
5.3.230.0000.07314.58
5.3.220.0100.06314.68
5.3.210.0100.06714.69
5.3.200.0170.06714.57
5.3.190.0030.08014.57
5.3.180.0030.04314.70
5.3.170.0030.07714.60
5.3.160.0170.06014.59
5.3.150.0000.08014.63
5.3.140.0070.07014.60
5.3.130.0170.07014.65
5.3.120.0100.07014.68
5.3.110.0130.05714.59
5.3.100.0100.07014.10
5.3.90.0070.07714.06
5.3.80.0100.05014.16
5.3.70.0100.07014.00
5.3.60.0170.06314.02
5.3.50.0000.05713.86
5.3.40.0000.07314.05
5.3.30.0070.06714.02
5.3.20.0100.06713.81
5.3.10.0070.06313.60
5.3.00.0070.06313.55
5.2.170.0030.06311.03
5.2.160.0130.05711.18
5.2.150.0070.05311.09
5.2.140.0070.06011.00
5.2.130.0100.04711.00
5.2.120.0000.06311.16
5.2.110.0170.04711.22
5.2.100.0000.06311.16
5.2.90.0070.05011.16
5.2.80.0070.06311.03
5.2.70.0030.06311.00
5.2.60.0070.06010.96
5.2.50.0100.05711.01
5.2.40.0000.04711.06
5.2.30.0070.06311.10
5.2.20.0030.04710.89
5.2.10.0100.02710.79
5.2.00.0130.05310.75
5.1.60.0000.05310.02
5.1.50.0070.04710.12
5.1.40.0030.05310.03
5.1.30.0030.05710.29
5.1.20.0070.05710.25
5.1.10.0030.04310.07
5.1.00.0030.05310.19
5.0.50.0100.0378.39
5.0.40.0030.0438.54
5.0.30.0100.0538.23
5.0.20.0030.0408.28
5.0.10.0070.0308.27
5.0.00.0000.0538.04
4.4.90.0000.0377.51
4.4.80.0000.0377.51
4.4.70.0030.0377.51
4.4.60.0000.0237.51
4.4.50.0030.0277.51
4.4.40.0030.0337.51
4.4.30.0000.0377.51
4.4.20.0000.0377.51
4.4.10.0070.0307.51
4.4.00.0030.0577.51
4.3.110.0000.0377.51
4.3.100.0030.0237.51
4.3.90.0070.0277.51
4.3.80.0070.0537.51
4.3.70.0000.0377.51
4.3.60.0000.0337.51
4.3.50.0000.0377.51
4.3.40.0000.0407.51
4.3.30.0000.0207.51
4.3.20.0000.0337.51
4.3.10.0000.0407.51
4.3.00.0030.0337.51

preferences:
49.9 ms | 400 KiB | 5 Q