3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'barValue'; protected $baz = 'bazValue'; private $biz = 'bizValue'; function test() { echo 'hi'; } } $foo = new Foo(); $arrayFoo = (array) $foo; var_dump($arrayFoo); $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($newArray);

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.0180.00418.31
8.3.50.0090.00921.33
8.3.40.0060.00918.79
8.3.30.0180.00319.02
8.3.20.0150.00320.20
8.3.10.0100.01022.22
8.3.00.0090.00020.58
8.2.180.0090.01216.38
8.2.170.0080.00822.96
8.2.160.0070.00719.04
8.2.150.0160.00324.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0090.00919.54
8.2.110.0060.00621.00
8.2.100.0080.00417.91
8.2.90.0040.00419.23
8.2.80.0040.00417.97
8.2.70.0060.00317.72
8.2.60.0050.00317.80
8.2.50.0000.00818.07
8.2.40.0050.00318.03
8.2.30.0040.00418.02
8.2.20.0040.00417.78
8.2.10.0050.00317.68
8.2.00.0130.00017.76
8.1.280.0140.00325.92
8.1.270.0090.00022.01
8.1.260.0090.00926.35
8.1.250.0100.01028.09
8.1.240.0060.00321.39
8.1.230.0070.00317.52
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0170.00617.00
8.1.190.0090.00017.23
8.1.180.0040.00418.61
8.1.170.0040.00418.59
8.1.160.0050.00322.21
8.1.150.0040.00418.63
8.1.140.0000.00817.59
8.1.130.0030.00317.81
8.1.120.0040.00417.58
8.1.110.0030.00517.53
8.1.100.0000.00717.52
8.1.90.0050.00217.53
8.1.80.0000.00717.52
8.1.70.0070.00017.60
8.1.60.0030.00517.61
8.1.50.0050.00317.67
8.1.40.0000.00817.67
8.1.30.0090.00017.79
8.1.20.0030.00517.71
8.1.10.0080.00017.68
8.1.00.0080.00017.61
8.0.300.0090.00018.77
8.0.290.0040.00416.63
8.0.280.0030.00518.39
8.0.270.0030.00317.22
8.0.260.0070.00016.88
8.0.250.0080.00016.98
8.0.240.0040.00416.89
8.0.230.0000.00717.03
8.0.220.0070.00016.87
8.0.210.0000.00716.93
8.0.200.0040.00416.98
8.0.190.0080.00017.04
8.0.180.0070.00016.96
8.0.170.0040.00416.91
8.0.160.0000.00816.85
8.0.150.0000.00716.86
8.0.140.0080.00016.93
8.0.130.0030.00613.38
8.0.120.0040.00416.91
8.0.110.0040.00417.00
8.0.100.0070.00016.84
8.0.90.0070.00016.76
8.0.80.0090.00616.84
8.0.70.0040.00417.01
8.0.60.0000.00716.90
8.0.50.0000.00816.86
8.0.30.0100.00817.24
8.0.20.0100.00917.40
8.0.10.0050.00317.13
8.0.00.0130.00617.03
7.4.330.0000.00515.00
7.4.320.0030.00316.84
7.4.300.0030.00316.70
7.4.290.0000.00716.82
7.4.280.0030.00316.63
7.4.270.0030.00316.77
7.4.260.0030.00316.74
7.4.250.0000.00816.67
7.4.240.0020.00516.77
7.4.230.0070.00016.92
7.4.220.0060.01016.83
7.4.210.0060.00916.78
7.4.200.0070.00016.62
7.4.190.0070.00016.59
7.4.160.0130.00316.59
7.4.150.0080.00817.40
7.4.140.0080.01017.86
7.4.130.0080.01316.68
7.4.120.0080.00816.79
7.4.110.0110.00616.69
7.4.100.0100.01416.63
7.4.90.0140.00316.76
7.4.80.0110.01119.39
7.4.70.0060.01316.75
7.4.60.0120.00916.52
7.4.50.0060.00316.56
7.4.40.0100.00722.77
7.4.30.0070.01016.89
7.4.00.0070.00715.29
7.3.330.0000.00513.45
7.3.320.0030.00313.35
7.3.310.0000.00716.41
7.3.300.0050.00216.39
7.3.290.0060.01016.39
7.3.280.0070.01016.38
7.3.270.0100.00717.40
7.3.260.0030.01416.59
7.3.250.0100.00816.41
7.3.240.0030.01416.45
7.3.230.0170.00416.43
7.3.210.0120.00616.24
7.3.200.0100.01119.39
7.3.190.0150.00416.70
7.3.180.0130.01016.62
7.3.170.0090.00716.40
7.3.160.0150.00316.61
7.3.120.0070.00714.85
7.3.10.0060.00916.70
7.3.00.0110.00316.66
7.2.330.0120.00616.66
7.2.320.0130.00316.66
7.2.310.0130.00416.66
7.2.300.0100.00716.70
7.2.290.0130.00316.79
7.2.130.0100.00516.98
7.2.120.0090.00716.93
7.2.110.0060.00816.92
7.2.100.0090.00517.06
7.2.90.0070.00716.88
7.2.80.0110.00516.99
7.2.70.0040.00917.09
7.2.60.0100.00116.96
7.2.50.0030.01016.94
7.2.40.0100.00817.06
7.2.30.0100.00516.69
7.2.20.0090.00816.89
7.2.10.0100.00617.08
7.2.00.0070.00917.73
7.1.250.0090.00615.85
7.1.240.0160.00315.53
7.1.230.0090.00915.77
7.1.220.0100.00715.67
7.1.210.0130.00715.80
7.1.200.0070.00715.57
7.1.190.0150.00015.76
7.1.180.0070.01015.82
7.1.170.0070.00715.89
7.1.160.0060.00915.91
7.1.150.0090.00615.96
7.1.140.0150.00315.51
7.1.130.0100.00315.52
7.1.120.0080.00815.73
7.1.110.0060.01215.84
7.1.100.0070.00716.95
7.1.90.0150.00415.80
7.1.80.0070.01015.38
7.1.70.0070.00716.51
7.1.60.0130.00517.87
7.1.50.0070.01016.37
7.1.40.0160.00315.92
7.1.30.0040.01215.72
7.1.20.0130.00715.64
7.1.10.0110.00715.93
7.1.00.0080.01818.97
7.0.330.0060.01015.00
7.0.320.0070.00715.19
7.0.310.0100.00715.31
7.0.300.0160.00015.39
7.0.290.0130.00615.22
7.0.280.0100.01015.13
7.0.270.0180.00015.26
7.0.260.0150.00715.31
7.0.250.0110.00715.29
7.0.240.0100.01015.28
7.0.230.0090.00615.05
7.0.220.0110.00415.26
7.0.210.0130.00715.22
7.0.200.0050.01016.23
7.0.190.0110.00815.21
7.0.180.0140.00715.18
7.0.170.0150.00315.63
7.0.160.0030.01715.48
7.0.150.0110.00515.36
7.0.140.0060.03918.66
7.0.130.0160.00715.29
7.0.120.0110.00715.26
7.0.110.0130.00315.28
7.0.100.0030.01615.25
7.0.90.0200.03217.67
7.0.80.0120.02517.58
7.0.70.0080.02517.56
7.0.60.0300.03517.72
7.0.50.0350.03517.78
7.0.40.0020.04516.66
7.0.30.0100.04316.76
7.0.20.0080.04716.64
7.0.10.0120.04216.69
7.0.00.0110.04216.78
5.6.380.0000.01214.34
5.6.370.0090.00614.36
5.6.360.0040.01113.86
5.6.350.0070.01014.26
5.6.340.0030.01414.34
5.6.330.0130.00514.24
5.6.320.0060.00914.53
5.6.310.0000.01814.19
5.6.300.0100.00314.35
5.6.290.0070.00714.20
5.6.280.0060.04817.67
5.6.270.0000.01114.06
5.6.260.0000.00914.05
5.6.250.0120.00613.96
5.6.240.0110.04517.30
5.6.230.0110.04317.43
5.6.220.0070.02917.40
5.6.210.0100.04317.46
5.6.200.0120.03517.71
5.6.190.0060.02817.49
5.6.180.0060.03417.56
5.6.170.0070.03417.61
5.6.160.0050.04517.66
5.6.150.0090.04317.56
5.6.140.0070.02517.61
5.6.130.0120.03417.47
5.6.120.0090.04517.58
5.6.110.0080.03617.57
5.6.100.0060.04617.56
5.6.90.0100.03217.53
5.6.80.0100.04217.15
5.6.70.0050.02617.43
5.6.60.0070.04517.27
5.6.50.0030.04717.24
5.6.40.0070.03717.38
5.6.30.0030.04517.42
5.6.20.0050.04717.31
5.6.10.0030.02817.25
5.6.00.0090.03017.22
5.5.380.0090.02815.81
5.5.370.0080.03615.87
5.5.360.0080.04015.72
5.5.350.0090.02715.66
5.5.340.0050.04015.92
5.5.330.0020.03016.06
5.5.320.0090.03615.98
5.5.310.0070.03215.91
5.5.300.0060.02516.02
5.5.290.0110.04115.93
5.5.280.0050.04015.97
5.5.270.0080.04215.86
5.5.260.0080.04516.00
5.5.250.0070.04815.83
5.5.240.0060.04115.55
5.5.230.0050.04315.53
5.5.220.0100.03315.56
5.5.210.0010.03115.73
5.5.200.0140.03115.60
5.5.190.0000.03415.76
5.5.180.0060.04115.45
5.5.170.0080.00311.27
5.5.160.0030.04315.59
5.5.150.0010.02815.61
5.5.140.0080.03515.54
5.5.130.0130.03315.65
5.5.120.0020.02915.69
5.5.110.0070.02315.49
5.5.100.0110.03315.56
5.5.90.0080.02115.63
5.5.80.0060.04115.51
5.5.70.0080.03115.53
5.5.60.0000.04815.50
5.5.50.0070.04115.53
5.5.40.0070.02315.50
5.5.30.0100.03315.47
5.5.20.0050.04115.57
5.5.10.0030.03615.52
5.5.00.0070.04215.51
5.4.450.0020.05015.22
5.4.440.0030.04815.06
5.4.430.0040.03115.08
5.4.420.0080.04015.17
5.4.410.0120.03714.98
5.4.400.0040.02715.08
5.4.390.0090.03714.91
5.4.380.0030.02915.05
5.4.370.0050.04315.10
5.4.360.0070.02415.15
5.4.350.0060.02914.89
5.4.340.0140.03015.00
5.4.330.0040.00410.94
5.4.320.0100.03715.14
5.4.310.0080.03815.15
5.4.300.0060.03315.12
5.4.290.0120.02814.94
5.4.280.0070.03814.92
5.4.270.0050.02314.97
5.4.260.0060.03915.05
5.4.250.0100.03714.97
5.4.240.0030.03715.01
5.4.230.0050.03015.08
5.4.220.0050.03314.97
5.4.210.0110.03514.92
5.4.200.0030.03815.02
5.4.190.0080.03614.99
5.4.180.0060.03714.99
5.4.170.0070.04414.91
5.4.160.0030.02414.86
5.4.150.0050.03014.93
5.4.140.0070.02613.55
5.4.130.0050.03113.65
5.4.120.0050.03513.66
5.4.110.0050.03713.83
5.4.100.0050.02113.72
5.4.90.0050.03213.62
5.4.80.0060.03813.75
5.4.70.0070.03013.79
5.4.60.0100.03313.63
5.4.50.0050.02313.65
5.4.40.0040.04313.73
5.4.30.0060.02613.59
5.4.20.0060.02213.69
5.4.10.0030.02713.85
5.4.00.0030.02513.38
5.3.290.0070.03812.75
5.3.280.0070.04012.78
5.3.270.0070.04012.79
5.3.260.0080.03512.82
5.3.250.0090.03512.77
5.3.240.0070.03212.78
5.3.230.0030.04212.73
5.3.220.0070.02212.78
5.3.210.0060.03012.77
5.3.200.0070.03212.77
5.3.190.0070.02712.79
5.3.180.0020.04212.70
5.3.170.0050.04012.79
5.3.160.0030.02312.79
5.3.150.0060.03812.76
5.3.140.0060.03312.72
5.3.130.0060.03912.77
5.3.120.0030.02812.76
5.3.110.0060.02612.74
5.3.100.0070.02512.50
5.3.90.0030.03812.47
5.3.80.0020.03912.47
5.3.70.0070.03812.47
5.3.60.0020.02712.48
5.3.50.0070.03712.45
5.3.40.0040.04212.37
5.3.30.0050.03512.41
5.3.20.0060.03112.34
5.3.10.0020.03012.31
5.3.00.0020.03112.30
5.2.170.0020.03311.04
5.2.160.0040.01810.97
5.2.150.0050.02411.02
5.2.140.0030.03211.06
5.2.130.0030.03210.94
5.2.120.0030.03210.94
5.2.110.0000.03610.94
5.2.100.0020.02711.01
5.2.90.0030.03211.01
5.2.80.0050.02510.94
5.2.70.0080.02710.94
5.2.60.0090.02210.94
5.2.50.0060.01511.02
5.2.40.0100.03311.00
5.2.30.0020.03610.94
5.2.20.0070.02610.91
5.2.10.0050.01810.94
5.2.00.0020.02410.88
5.1.60.0010.03110.37
5.1.50.0030.02910.49
5.1.40.0000.03110.48
5.1.30.0030.02210.63
5.1.20.0070.02510.68
5.1.10.0050.03110.48
5.1.00.0040.02910.40
5.0.50.0030.0219.77
5.0.40.0040.0129.70
5.0.30.0010.0299.61
5.0.20.0030.0139.62
5.0.10.0080.0179.55
5.0.00.0020.0239.55
4.4.90.0000.0149.02
4.4.80.0080.0079.02
4.4.70.0030.0179.02
4.4.60.0020.0209.02
4.4.50.0020.0159.02
4.4.40.0030.0279.02
4.4.30.0030.0119.02
4.4.20.0010.0199.02
4.4.10.0040.0129.02
4.4.00.0020.0299.02
4.3.110.0040.0089.02
4.3.100.0030.0159.02
4.3.90.0020.0159.02
4.3.80.0050.0209.02
4.3.70.0030.0109.02
4.3.60.0040.0129.02
4.3.50.0080.0159.02
4.3.40.0050.0209.02
4.3.30.0030.0109.02
4.3.20.0060.0109.02
4.3.10.0020.0229.02
4.3.00.0000.0169.02

preferences:
43.08 ms | 401 KiB | 5 Q