3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar; private $baz; public function __construct($bar, $baz) { $this->bar = $bar; $this->baz = $baz; } } $foo = new Foo('hello','word'); $string = json_encode($foo); echo $string;

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.0070.00716.63
8.3.50.0100.00821.10
8.3.40.0100.01018.67
8.3.30.0120.00918.57
8.3.20.0040.00420.29
8.3.10.0080.00023.46
8.3.00.0040.00419.80
8.2.180.0180.00325.92
8.2.170.0150.00318.80
8.2.160.0080.00322.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0030.00617.75
8.2.110.0000.00922.18
8.2.100.0000.01217.50
8.2.90.0040.00419.23
8.2.80.0030.00617.97
8.2.70.0040.00417.50
8.2.60.0020.00718.05
8.2.50.0080.00018.07
8.2.40.0000.00719.21
8.2.30.0040.00419.75
8.2.20.0000.00817.55
8.2.10.0050.00318.09
8.2.00.0000.00818.06
8.1.280.0040.01125.92
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0030.00728.09
8.1.240.0100.00722.55
8.1.230.0040.00717.42
8.1.220.0050.00517.74
8.1.210.0040.00418.77
8.1.200.0060.00317.25
8.1.190.0040.00417.35
8.1.180.0070.00018.10
8.1.170.0050.00318.52
8.1.160.0040.00421.88
8.1.150.0070.00018.72
8.1.140.0050.00317.30
8.1.130.0000.00717.55
8.1.120.0070.00017.44
8.1.110.0040.00417.35
8.1.100.0000.00717.23
8.1.90.0060.00317.45
8.1.80.0000.00817.43
8.1.70.0040.00417.45
8.1.60.0000.00817.63
8.1.50.0080.00017.55
8.1.40.0040.00417.39
8.1.30.0030.00517.64
8.1.20.0020.00517.68
8.1.10.0000.00717.45
8.1.00.0030.00517.40
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0070.00018.43
8.0.270.0070.00017.24
8.0.260.0030.00317.23
8.0.250.0040.00416.89
8.0.240.0060.00016.89
8.0.230.0030.00316.75
8.0.220.0070.00016.76
8.0.210.0070.00016.77
8.0.200.0030.00316.92
8.0.190.0030.00916.76
8.0.180.0040.00416.85
8.0.170.0000.00816.79
8.0.160.0040.00416.86
8.0.150.0080.00016.74
8.0.140.0040.00416.77
8.0.130.0030.00313.20
8.0.120.0030.00516.78
8.0.110.0040.00416.79
8.0.100.0040.00416.87
8.0.90.0070.00016.69
8.0.80.0060.01016.81
8.0.70.0080.00016.63
8.0.60.0020.00516.72
8.0.50.0040.00416.67
8.0.30.0090.01116.94
8.0.20.0090.01117.40
8.0.10.0040.00416.90
8.0.00.0060.01316.75
7.4.330.0030.00315.08
7.4.320.0000.00716.54
7.4.300.0060.00016.60
7.4.290.0000.00716.57
7.4.280.0000.00716.57
7.4.270.0070.00016.63
7.4.260.0040.00416.60
7.4.250.0070.00016.57
7.4.240.0020.00516.55
7.4.230.0030.00416.63
7.4.220.0150.00716.62
7.4.210.0130.00716.43
7.4.200.0000.00716.68
7.4.160.0150.00316.40
7.4.150.0210.01817.40
7.4.140.0170.00617.86
7.4.130.0110.00716.57
7.4.120.0090.00816.51
7.4.110.0110.01416.61
7.4.100.0100.01016.62
7.4.90.0070.01016.60
7.4.80.0130.00719.39
7.4.70.0060.00916.43
7.4.60.0040.01116.51
7.4.50.0040.00416.18
7.4.40.0070.01016.38
7.4.30.0090.00916.52
7.4.10.0130.00714.51
7.4.00.0070.01214.91
7.3.330.0040.00213.05
7.3.320.0050.00013.24
7.3.310.0050.00216.10
7.3.300.0000.00716.28
7.3.290.0070.00916.22
7.3.280.0110.00716.22
7.3.270.0100.00717.40
7.3.260.0100.00716.30
7.3.250.0080.01116.34
7.3.240.0150.00316.41
7.3.230.0060.01216.47
7.3.210.0030.01416.18
7.3.200.0120.00416.60
7.3.190.0140.00516.09
7.3.180.0130.00916.29
7.3.170.0110.01016.27
7.3.160.0120.00616.65
7.3.130.0090.00614.61
7.3.120.0120.00814.80
7.3.110.0050.01414.57
7.3.100.0090.00614.87
7.3.90.0030.01414.83
7.3.80.0020.01214.67
7.3.70.0050.00614.68
7.3.60.0100.00614.65
7.3.50.0060.00714.63
7.3.40.0060.00514.62
7.3.30.0080.00814.63
7.3.20.0030.00916.54
7.3.10.0040.01116.52
7.3.00.0080.00616.45
7.2.330.0070.01016.47
7.2.320.0080.01116.47
7.2.310.0130.00616.50
7.2.300.0110.00516.81
7.2.290.0180.00416.46
7.2.260.0040.01414.93
7.2.250.0100.01015.01
7.2.240.0070.01215.15
7.2.230.0070.00615.07
7.2.220.0070.00614.89
7.2.210.0070.00515.10
7.2.200.0050.00714.99
7.2.190.0030.01114.89
7.2.180.0090.00615.04
7.2.170.0050.00514.84
7.2.160.0080.00415.12
7.2.150.0000.01416.88
7.2.140.0090.00916.70
7.2.130.0110.00416.81
7.2.120.0070.00716.83
7.2.110.0060.00916.86
7.2.100.0000.01816.70
7.2.90.0100.00317.02
7.2.80.0040.01116.96
7.2.70.0030.01516.68
7.2.60.0040.01116.71
7.2.50.0070.00316.85
7.2.40.0030.00716.97
7.2.30.0070.01116.87
7.2.20.0060.00616.96
7.2.10.0060.00617.12
7.2.00.0090.00617.92
7.1.330.0070.00715.79
7.1.320.0040.00615.80
7.1.310.0040.00715.92
7.1.300.0060.00915.70
7.1.290.0040.01215.87
7.1.280.0020.01215.73
7.1.270.0050.00415.72
7.1.260.0060.00415.77
7.1.250.0060.00915.52
7.1.240.0060.00615.79
7.1.230.0060.00615.92
7.1.220.0000.01515.62
7.1.210.0080.00015.54
7.1.200.0060.00615.93
7.1.190.0040.01415.75
7.1.180.0040.01115.54
7.1.170.0120.00315.74
7.1.160.0090.00615.89
7.1.150.0030.01015.61
7.1.140.0060.00615.91
7.1.130.0130.00015.65
7.1.120.0030.01415.84
7.1.110.0030.01015.95
7.1.100.0090.00817.00
7.1.90.0130.00015.82
7.1.80.0070.00715.53
7.1.70.0070.00716.67
7.1.60.0050.01217.92
7.1.50.0050.00916.25
7.1.40.0000.01215.58
7.1.30.0100.00315.94
7.1.20.0140.00015.70
7.1.10.0110.00415.81
7.1.00.0080.03619.13
7.0.330.0060.00615.43
7.0.320.0080.00415.43
7.0.310.0040.00915.49
7.0.300.0080.00815.48
7.0.290.0000.01015.43
7.0.280.0000.01415.20
7.0.270.0130.00015.44
7.0.260.0060.00615.47
7.0.250.0000.00915.32
7.0.240.0090.00315.48
7.0.230.0070.00715.63
7.0.220.0060.00315.51
7.0.210.0090.00315.64
7.0.200.0130.00615.03
7.0.190.0080.00015.37
7.0.180.0070.00715.36
7.0.170.0090.00015.54
7.0.160.0060.00315.21
7.0.150.0100.00315.22
7.0.140.0000.01315.13
7.0.130.0030.01015.50
7.0.120.0090.00915.41
7.0.110.0030.03917.73
7.0.100.0050.03717.78
7.0.90.0090.02417.64
7.0.80.0100.03717.70
7.0.70.0090.04417.72
7.0.60.0090.03717.62
7.0.50.0080.04217.91
7.0.40.0050.03716.69
7.0.30.0060.04616.98
7.0.20.0050.04216.73
7.0.10.0070.04516.78
7.0.00.0100.03516.81
5.6.400.0040.00714.10
5.6.390.0070.01014.34
5.6.380.0120.00014.23
5.6.370.0030.00614.73
5.6.360.0000.01414.37
5.6.350.0070.00714.32
5.6.340.0000.01714.62
5.6.330.0070.00714.16
5.6.320.0000.00914.60
5.6.310.0030.00714.61
5.6.300.0000.00814.66
5.6.290.0030.00714.45
5.6.280.0040.03917.62
5.6.270.0090.00914.24
5.6.260.0000.01114.37
5.6.250.0100.04217.42
5.6.240.0100.04517.30
5.6.230.0020.05117.47
5.6.220.0050.03617.51
5.6.210.0070.04217.32
5.6.200.0020.04917.92
5.6.190.0080.04217.78
5.6.180.0100.02317.69
5.6.170.0050.04017.62
5.6.160.0070.04517.75
5.6.150.0050.03917.70
5.6.140.0030.04217.80
5.6.130.0090.04317.60
5.6.120.0050.04117.64
5.6.110.0060.04417.61
5.6.100.0090.04217.63
5.6.90.0050.05017.60
5.6.80.0050.02817.36
5.6.70.0070.03717.39
5.6.60.0090.03217.51
5.6.50.0100.04017.38
5.6.40.0050.04417.32
5.6.30.0030.04517.39
5.6.20.0070.03817.33
5.6.10.0080.04217.41
5.6.00.0120.02217.39
5.5.380.0140.03717.37
5.5.370.0080.03517.31
5.5.360.0020.04717.36
5.5.350.0050.04817.31
5.5.340.0080.04017.40
5.5.330.0080.04017.61
5.5.320.0050.03117.41
5.5.310.0030.04317.54
5.5.300.0060.04117.57
5.5.290.0030.02817.59
5.5.280.0050.04617.77
5.5.270.0050.02917.40
5.5.260.0080.04217.57
5.5.250.0070.03317.42
5.5.240.0090.04317.25
5.5.230.0090.04517.23
5.5.220.0120.03817.08
5.5.210.0050.04317.17
5.5.200.0000.04817.05
5.5.190.0050.04117.16
5.5.180.0080.04017.29
5.5.170.0000.01614.24
5.5.160.0070.04517.14
5.5.150.0050.04517.00
5.5.140.0080.04017.31
5.5.130.0070.04017.23
5.5.120.0080.03517.11
5.5.110.0120.03917.07
5.5.100.0050.04617.22
5.5.90.0130.03216.92
5.5.80.0100.04017.13
5.5.70.0170.02217.08
5.5.60.0050.02717.15
5.5.50.0070.04017.12
5.5.40.0060.04017.27
5.5.30.0090.02917.09
5.5.20.0020.04716.96
5.5.10.0080.04016.90
5.5.00.0110.04016.98
5.4.450.0090.03815.43
5.4.440.0070.04015.43
5.4.430.0050.03215.17
5.4.420.0060.02615.29
5.4.410.0070.04015.35
5.4.400.0080.03615.20
5.4.390.0070.04015.00
5.4.380.0090.03715.06
5.4.370.0060.03615.25
5.4.360.0060.04215.16
5.4.350.0060.04315.00
5.4.340.0110.02115.07
5.4.330.0040.00810.82
5.4.320.0040.04115.21
5.4.310.0160.02815.15
5.4.300.0050.04215.09
5.4.290.0050.04015.13
5.4.280.0020.04515.10
5.4.270.0070.04215.28
5.4.260.0030.04415.16
5.4.250.0100.02015.02
5.4.240.0100.03514.95
5.4.230.0050.04115.13
5.4.220.0150.03215.26
5.4.210.0100.02115.00
5.4.200.0020.04314.99
5.4.190.0070.02315.18
5.4.180.0050.03815.05
5.4.170.0030.04315.04
5.4.160.0020.04015.17
5.4.150.0080.03815.11
5.4.140.0080.02813.76
5.4.130.0040.03813.68
5.4.120.0070.03713.74
5.4.110.0050.04013.69
5.4.100.0050.02713.78
5.4.90.0030.03413.80
5.4.80.0030.04013.76
5.4.70.0070.02313.78
5.4.60.0060.02313.81
5.4.50.0060.03713.83
5.4.40.0090.03513.83
5.4.30.0030.04213.73
5.4.20.0070.02613.76
5.4.10.0030.04213.87
5.4.00.0030.03013.52

preferences:
45.85 ms | 401 KiB | 5 Q