3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ const ERROR_CODE = '404'; public $public_ex = 'this is public'; private $private_ex = 'this is private!'; protected $protected_ex = 'this should be protected'; public function getErrorCode() { return self::ERROR_CODE; } } $foo = new Foo; $foo_json = json_encode($foo); echo $foo_json;

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.0060.00916.38
8.3.60.0100.01018.43
8.3.50.0150.00521.99
8.3.40.0100.01018.71
8.3.30.0140.00718.84
8.3.20.0000.00720.16
8.3.10.0000.00823.65
8.3.00.0030.00519.25
8.2.180.0150.00816.75
8.2.170.0120.00322.96
8.2.160.0120.00319.25
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0070.00022.19
8.2.110.0050.00522.05
8.2.100.0070.00417.84
8.2.90.0000.00817.84
8.2.80.0040.00419.17
8.2.70.0030.00617.50
8.2.60.0050.00517.50
8.2.50.0090.00017.38
8.2.40.0000.00917.62
8.2.30.0000.00718.00
8.2.20.0000.00817.75
8.2.10.0040.00417.97
8.2.00.0080.00017.62
8.1.280.0120.00925.92
8.1.270.0070.01122.11
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0080.00022.02
8.1.230.0060.00621.11
8.1.220.0040.00417.74
8.1.210.0030.00618.85
8.1.200.0040.00417.11
8.1.190.0080.00016.88
8.1.180.0030.00618.10
8.1.170.0090.00018.35
8.1.160.0000.00718.86
8.1.150.0000.00718.68
8.1.140.0070.00017.38
8.1.130.0070.00017.70
8.1.120.0070.00017.41
8.1.110.0040.00417.39
8.1.100.0000.00717.35
8.1.90.0070.00017.43
8.1.80.0050.00317.39
8.1.70.0030.00317.32
8.1.60.0030.00617.48
8.1.50.0050.00317.36
8.1.40.0040.00417.34
8.1.30.0040.00417.63
8.1.20.0070.00017.43
8.1.10.0000.00817.63
8.1.00.0050.00317.36
8.0.300.0040.00420.21
8.0.290.0070.00716.75
8.0.280.0050.00218.35
8.0.270.0070.00017.29
8.0.260.0070.00020.20
8.0.250.0030.00317.03
8.0.240.0030.00316.98
8.0.230.0040.00416.93
8.0.220.0030.00316.72
8.0.210.0040.00416.71
8.0.200.0030.00316.91
8.0.190.0000.00716.77
8.0.180.0040.00416.90
8.0.170.0000.00916.85
8.0.160.0030.00316.82
8.0.150.0030.00516.77
8.0.140.0000.00716.82
8.0.130.0030.00313.22
8.0.120.0030.00616.80
8.0.110.0040.00416.82
8.0.100.0000.00716.80
8.0.90.0030.00316.80
8.0.80.0140.00716.86
8.0.70.0000.00716.89
8.0.60.0050.00216.79
8.0.50.0020.00516.75
8.0.30.0120.01116.99
8.0.20.0140.00817.40
8.0.10.0040.00416.77
8.0.00.0130.00316.67
7.4.330.0050.00215.02
7.4.320.0000.00616.54
7.4.300.0000.00616.45
7.4.290.0000.00716.44
7.4.280.0090.00016.43
7.4.270.0030.00316.57
7.4.260.0000.00716.43
7.4.250.0000.00816.45
7.4.240.0050.00216.46
7.4.230.0040.00416.57
7.4.220.0040.01416.45
7.4.210.0090.00616.49
7.4.200.0070.00016.61
7.4.160.0100.00616.34
7.4.150.0140.00317.40
7.4.140.0180.00517.86
7.4.130.0120.00516.56
7.4.120.0120.00516.49
7.4.110.0200.00316.41
7.4.100.0110.00516.64
7.4.90.0100.00716.52
7.4.80.0140.00719.39
7.4.70.0090.01216.49
7.4.60.0090.00616.50
7.4.50.0000.00416.45
7.4.40.0140.00316.59
7.4.30.0110.00516.34
7.4.10.0100.00715.05
7.4.00.0050.01214.86
7.3.330.0040.00413.16
7.3.320.0030.00313.25
7.3.310.0070.00016.28
7.3.300.0030.00316.16
7.3.290.0050.00916.20
7.3.280.0070.00916.19
7.3.270.0170.00017.40
7.3.260.0110.00616.34
7.3.250.0080.00816.51
7.3.240.0030.01316.27
7.3.230.0120.00616.39
7.3.210.0090.00616.35
7.3.200.0060.01019.39
7.3.190.0100.01216.59
7.3.180.0030.01516.21
7.3.170.0030.01316.44
7.3.160.0140.00416.26
7.3.130.0180.00014.82
7.3.120.0060.01014.66
7.3.110.0100.00314.71
7.3.100.0070.00714.43
7.3.90.0060.00314.72
7.3.80.0060.00314.46
7.3.70.0110.00014.49
7.3.60.0040.01614.78
7.3.50.0030.01314.74
7.3.40.0000.01614.85
7.3.30.0040.01114.89
7.3.20.0090.00616.79
7.3.10.0120.00316.64
7.3.00.0100.00316.57
7.2.330.0070.01016.58
7.2.320.0090.00916.62
7.2.310.0160.00616.71
7.2.300.0030.01216.36
7.2.290.0120.00916.41
7.2.260.0070.01114.65
7.2.250.0110.00714.80
7.2.240.0090.00614.89
7.2.230.0060.01015.04
7.2.220.0110.01114.98
7.2.210.0090.00614.86
7.2.200.0000.00914.82
7.2.190.0060.00915.07
7.2.180.0100.00714.75
7.2.170.0070.01014.94
7.2.160.0030.01314.93
7.2.150.0090.00616.73
7.2.140.0060.00616.78
7.2.130.0060.00616.67
7.2.120.0070.00716.75
7.2.110.0000.01416.77
7.2.100.0040.01116.63
7.2.90.0090.00916.75
7.2.80.0090.00616.85
7.2.70.0060.00916.84
7.2.60.0110.00416.74
7.2.50.0070.00717.05
7.2.40.0040.01216.89
7.2.30.0040.00816.56
7.2.20.0070.01016.89
7.2.10.0070.00316.89
7.2.00.0080.00718.09
7.1.330.0080.00616.03
7.1.320.0030.01715.90
7.1.310.0000.01615.91
7.1.300.0000.01415.71
7.1.290.0090.00315.59
7.1.280.0060.01015.65
7.1.270.0090.00615.70
7.1.260.0030.00715.82
7.1.250.0030.00615.72
7.1.240.0030.01015.80
7.1.230.0040.01115.91
7.1.220.0040.00815.95
7.1.210.0070.00315.89
7.1.200.0040.01115.71
7.1.190.0050.00515.74
7.1.180.0030.00915.86
7.1.170.0100.00315.78
7.1.160.0030.01315.49
7.1.150.0000.01115.65
7.1.140.0140.00015.69
7.1.130.0000.00915.77
7.1.120.0060.00915.47
7.1.110.0060.00315.78
7.1.100.0030.01116.79
7.1.90.0070.00315.92
7.1.80.0000.01215.65
7.1.70.0020.00816.34
7.1.60.0080.00617.64
7.1.50.0180.00825.41
7.1.40.0040.00715.97
7.1.30.0100.00715.78
7.1.20.0030.01015.92
7.1.10.0040.01115.65
7.1.00.0030.04318.98
7.0.330.0030.00915.32
7.0.320.0000.01315.38
7.0.310.0060.00615.36
7.0.300.0000.01115.52
7.0.290.0090.00615.11
7.0.280.0060.00615.43
7.0.270.0030.01015.20
7.0.260.0100.00315.53
7.0.250.0080.00415.44
7.0.240.0030.01315.54
7.0.230.0000.00815.01
7.0.220.0040.00715.36
7.0.210.0080.00415.57
7.0.200.0140.00116.21
7.0.190.0060.00315.36
7.0.180.0060.00615.25
7.0.170.0070.01015.56
7.0.160.0030.01315.41
7.0.150.0060.00315.34
7.0.140.0030.04018.65
7.0.130.0100.00315.34
7.0.120.0070.00315.45
7.0.110.0080.00415.26
7.0.100.0030.00715.46
7.0.90.0230.02517.53
7.0.80.0330.04117.69
7.0.70.0160.02317.65
7.0.60.0410.04017.63
7.0.50.0360.04117.98
7.0.40.0060.02616.81
7.0.30.0070.04116.88
7.0.20.0080.04016.72
7.0.10.0070.04316.77
7.0.00.0100.02816.64
5.6.400.0120.00314.38
5.6.390.0080.00614.27
5.6.380.0000.00914.48
5.6.370.0080.00414.50
5.6.360.0110.00314.18
5.6.350.0040.00814.17
5.6.340.0150.00014.17
5.6.330.0000.01314.21
5.6.320.0030.00614.32
5.6.310.0100.00314.22
5.6.300.0000.00914.56
5.6.290.0150.00013.90
5.6.280.0020.04217.72
5.6.270.0060.00914.31
5.6.260.0030.01014.11
5.6.250.0030.01014.27
5.6.240.0110.04017.38
5.6.230.0130.04017.40
5.6.220.0070.02817.46
5.6.210.0080.04217.50
5.6.200.0060.02817.70
5.6.190.0060.04317.61
5.6.180.0050.04717.74
5.6.170.0050.03717.82
5.6.160.0090.04317.75
5.6.150.0050.04417.61
5.6.140.0070.03317.57
5.6.130.0020.03217.71
5.6.120.0070.02217.65
5.6.110.0070.02517.57
5.6.100.0070.03017.63
5.6.90.0030.02317.64
5.6.80.0070.02417.51
5.6.70.0050.02317.35
5.6.60.0050.03417.38
5.6.50.0050.02217.26
5.6.40.0100.01817.31
5.6.30.0030.02317.12
5.6.20.0060.02117.31
5.6.10.0090.02017.29
5.6.00.0030.02417.28
5.5.380.0080.02617.26
5.5.370.0030.05017.46
5.5.360.0120.04117.14
5.5.350.0100.02717.29
5.5.340.0120.04017.71
5.5.330.0190.03317.63
5.5.320.0080.04117.44
5.5.310.0070.04217.47
5.5.300.0070.02417.55
5.5.290.0030.02717.57
5.5.280.0020.02717.59
5.5.270.0030.03317.63
5.5.260.0070.02517.54
5.5.250.0050.02117.63
5.5.240.0080.02217.22
5.5.230.0050.02417.12
5.5.220.0050.02317.19
5.5.210.0110.01717.08
5.5.200.0110.01817.19
5.5.190.0050.03817.29
5.5.180.0050.02317.11
5.5.170.0100.00714.09
5.5.160.0050.02217.04
5.5.150.0050.02117.12
5.5.140.0080.01916.99
5.5.130.0020.03017.05
5.5.120.0040.02517.23
5.5.110.0030.02617.06
5.5.100.0030.02717.08
5.5.90.0090.02016.96
5.5.80.0020.02517.15
5.5.70.0030.02417.21
5.5.60.0100.02317.05
5.5.50.0040.02917.07
5.5.40.0050.02617.17
5.5.30.0050.02317.16
5.5.20.0050.03817.16
5.5.10.0050.03716.90
5.5.00.0060.02517.21
5.4.450.0020.02715.29
5.4.440.0020.02415.25
5.4.430.0020.02515.31
5.4.420.0030.03015.20
5.4.410.0050.02115.25
5.4.400.0030.01815.04
5.4.390.0030.03815.04
5.4.380.0070.01715.11
5.4.370.0030.02315.14
5.4.360.0050.02015.09
5.4.350.0090.02315.16
5.4.340.0080.01815.06
5.4.330.0050.00511.09
5.4.320.0000.02515.14
5.4.310.0040.02314.94
5.4.300.0030.01915.08
5.4.290.0020.03714.97
5.4.280.0020.03615.00
5.4.270.0020.02015.11
5.4.260.0030.02515.06
5.4.250.0030.02115.06
5.4.240.0030.02215.04
5.4.230.0060.02315.11
5.4.220.0070.02015.17
5.4.210.0060.03815.04
5.4.200.0030.02015.11
5.4.190.0020.02315.09
5.4.180.0030.02215.13
5.4.170.0080.01615.13
5.4.160.0040.03715.07
5.4.150.0100.03215.10
5.4.140.0050.03613.71
5.4.130.0110.03513.71
5.4.120.0030.03913.72
5.4.110.0110.03513.77
5.4.100.0060.04013.79
5.4.90.0130.03013.73
5.4.80.0020.02813.78
5.4.70.0030.03013.68
5.4.60.0070.03413.74
5.4.50.0050.02313.72
5.4.40.0050.03013.79
5.4.30.0080.02213.78
5.4.20.0030.04213.77
5.4.10.0050.03913.70
5.4.00.0020.03913.38
5.3.290.0070.03714.68
5.3.280.0000.05714.61
5.3.270.0070.03314.61
5.3.260.0030.03714.60
5.3.250.0070.07314.63
5.3.240.0030.08314.69
5.3.230.0100.07714.52
5.3.220.0130.07014.57
5.3.210.0100.07714.54
5.3.200.0070.07314.48
5.3.190.0070.08014.53
5.3.180.0100.06714.56
5.3.170.0070.05314.68
5.3.160.0100.03714.53
5.3.150.0070.06314.58
5.3.140.0130.06314.48
5.3.130.0170.06314.60
5.3.120.0000.07014.67
5.3.110.0030.08014.44
5.3.100.0030.04714.15
5.3.90.0070.07014.00
5.3.80.0100.07713.94
5.3.70.0000.05313.99
5.3.60.0070.08014.14
5.3.50.0130.04014.06
5.3.40.0130.06313.85
5.3.30.0100.04014.02
5.3.20.0000.05013.74
5.3.10.0030.05013.71
5.3.00.0030.03713.56
5.2.170.0100.05311.07
5.2.160.0070.06011.21
5.2.150.0030.04011.23
5.2.140.0070.05711.04
5.2.130.0070.04710.98
5.2.120.0000.06011.10
5.2.110.0030.05711.09
5.2.100.0000.04011.15
5.2.90.0100.05311.16
5.2.80.0100.05011.15
5.2.70.0100.03011.09
5.2.60.0030.05711.18
5.2.50.0030.06711.10
5.2.40.0030.06711.11
5.2.30.0000.06711.11
5.2.20.0100.04710.96
5.2.10.0000.05710.92
5.2.00.0030.04710.77
5.1.60.0000.0409.88
5.1.50.0030.0609.88
5.1.40.0100.0479.97
5.1.30.0070.03710.47
5.1.20.0070.05710.38
5.1.10.0070.03010.09
5.1.00.0030.05310.16
5.0.50.0030.0438.60
5.0.40.0030.0438.41
5.0.30.0000.0678.07
5.0.20.0000.0378.29
5.0.10.0030.0438.16
5.0.00.0070.0478.27
4.4.90.0000.0377.21
4.4.80.0030.0277.21
4.4.70.0030.0377.21
4.4.60.0030.0337.21
4.4.50.0030.0177.21
4.4.40.0030.0337.21
4.4.30.0000.0237.21
4.4.20.0000.0377.21
4.4.10.0130.0237.21
4.4.00.0100.0437.21
4.3.110.0030.0237.21
4.3.100.0030.0307.21
4.3.90.0000.0237.21
4.3.80.0030.0507.21
4.3.70.0000.0337.21
4.3.60.0000.0307.21
4.3.50.0000.0337.21
4.3.40.0070.0507.21
4.3.30.0000.0377.21
4.3.20.0000.0307.21
4.3.10.0000.0307.21
4.3.00.0030.0337.21

preferences:
61.72 ms | 401 KiB | 5 Q