3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Car { var $color; function Car($color="green") { $this->color = $color; } function what_color() { return $this->color; } } function print_vars($obj) { foreach (get_object_vars($obj) as $prop => $val) { echo "\t$prop = $val\n"; } } // instantiate one object $herbie = new Car("white"); // show herbie properties echo "\herbie: Properties\n"; print_vars($herbie);

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.0140.00318.30
8.3.50.0100.01021.98
8.3.40.0120.00618.85
8.3.30.0100.00318.53
8.3.20.0070.00718.65
8.3.10.0000.00821.10
8.3.00.0090.00317.88
8.2.180.0170.00318.29
8.2.170.0000.01422.96
8.2.160.0100.00320.35
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0080.00021.14
8.2.110.0070.00320.50
8.2.100.0060.00617.78
8.2.90.0040.00419.23
8.2.80.0060.00317.97
8.2.70.0070.00517.62
8.2.60.0040.00418.04
8.2.50.0060.00318.07
8.2.40.0030.00518.34
8.2.30.0030.00519.45
8.2.20.0050.00317.64
8.2.10.0040.00417.61
8.2.00.0000.00917.68
8.1.280.0130.00725.92
8.1.270.0040.00423.99
8.1.260.0030.01026.35
8.1.250.0000.00728.09
8.1.240.0030.01022.40
8.1.230.0040.00720.90
8.1.220.0050.00318.77
8.1.210.0080.00018.84
8.1.200.0090.00017.23
8.1.190.0000.00917.41
8.1.180.0040.00418.10
8.1.170.0040.00418.59
8.1.160.0000.00718.85
8.1.150.0050.00318.64
8.1.140.0040.00417.37
8.1.130.0070.00017.74
8.1.120.0040.00417.36
8.1.110.0000.00717.43
8.1.100.0000.00817.30
8.1.90.0040.00417.43
8.1.80.0000.00717.45
8.1.70.0030.00317.46
8.1.60.0040.00717.57
8.1.50.0000.00717.40
8.1.40.0000.00717.54
8.1.30.0040.00417.61
8.1.20.0080.00017.56
8.1.10.0030.00617.52
8.1.00.0030.00517.52
8.0.300.0000.00719.85
8.0.290.0000.00817.18
8.0.280.0000.00718.35
8.0.270.0030.00717.17
8.0.260.0030.00316.82
8.0.250.0050.00316.84
8.0.240.0000.00816.83
8.0.230.0070.00016.91
8.0.220.0030.00316.80
8.0.210.0070.00016.75
8.0.200.0040.00416.95
8.0.190.0070.00016.98
8.0.180.0030.00516.89
8.0.170.0070.00016.98
8.0.160.0030.00517.00
8.0.150.0030.00316.70
8.0.140.0070.00016.76
8.0.130.0040.00413.28
8.0.120.0050.00316.82
8.0.110.0000.00716.74
8.0.100.0000.00716.69
8.0.90.0000.00816.74
8.0.80.0080.00816.77
8.0.70.0050.00316.94
8.0.60.0040.00416.86
8.0.50.0040.00416.93
8.0.30.0090.00917.13
8.0.20.0100.01017.40
8.0.10.0000.00716.89
8.0.00.0100.01216.86
7.4.330.0000.00616.82
7.4.320.0030.00616.52
7.4.300.0000.00616.48
7.4.290.0070.00016.61
7.4.280.0000.01116.52
7.4.270.0030.00316.50
7.4.260.0000.00613.24
7.4.250.0080.00016.38
7.4.240.0040.00416.50
7.4.230.0020.00516.55
7.4.220.0090.00916.63
7.4.210.0080.00916.52
7.4.200.0030.00316.31
7.4.190.0030.00316.55
7.4.160.0190.00516.42
7.4.150.0200.00617.40
7.4.140.0070.01017.86
7.4.130.0050.01616.56
7.4.120.0060.01116.58
7.4.110.0030.01316.46
7.4.100.0070.01116.47
7.4.90.0090.00916.70
7.4.80.0080.00819.39
7.4.70.0080.00816.58
7.4.60.0060.01216.62
7.4.50.0040.00416.59
7.4.40.0110.00722.77
7.4.30.0160.00716.46
7.4.00.0000.01714.66
7.3.330.0070.00013.25
7.3.320.0000.00613.45
7.3.310.0000.00716.47
7.3.300.0030.00316.37
7.3.290.0110.00416.45
7.3.280.0070.00816.40
7.3.270.0160.01017.40
7.3.260.0110.01018.24
7.3.250.0110.00816.46
7.3.240.0130.00316.48
7.3.230.0050.01116.42
7.3.210.0110.00616.48
7.3.200.0100.01219.39
7.3.190.0150.00716.46
7.3.180.0080.00816.53
7.3.170.0120.00316.43
7.3.160.0060.01116.61
7.3.120.0070.01114.88
7.2.330.0060.01216.73
7.2.320.0000.01716.89
7.2.310.0110.01016.74
7.2.300.0040.01416.63
7.2.290.0120.00816.71
7.2.60.0000.01616.96
7.2.00.0100.00319.41
7.1.200.0090.00315.89
7.1.100.0000.01218.37
7.1.70.0050.00217.34
7.1.60.0030.01016.96
7.1.50.0000.01417.05
7.1.40.0080.00616.40
7.1.30.0040.00716.68
7.1.20.0070.00316.73
7.1.10.0000.01016.70
7.1.00.0040.00416.82
7.0.200.0080.00316.77
7.0.190.0100.00016.80
7.0.180.0080.00316.12
7.0.170.0040.00716.46
7.0.160.0040.00816.36
7.0.150.0000.00916.26
7.0.140.0000.00916.36
7.0.130.0000.00716.61
7.0.120.0000.01016.82
7.0.110.0000.00816.21
7.0.100.0000.00816.48
7.0.90.0000.00716.35
7.0.80.0060.00316.27
7.0.70.0090.00016.47
7.0.60.0040.00416.29
7.0.50.0030.00616.29
7.0.40.0030.00514.48
7.0.30.0000.00814.53
7.0.20.0090.01214.46
7.0.10.0030.00914.46
7.0.00.0000.01114.46
5.6.300.0130.03020.96
5.6.290.0030.09320.80
5.6.280.0000.04420.91
5.6.270.0060.04220.99
5.6.260.0000.05120.79
5.6.250.0030.04320.91
5.6.240.0030.05220.82
5.6.230.0000.04420.82
5.6.220.0040.04220.85
5.6.210.0030.06721.16
5.6.200.0000.04720.75
5.6.190.0070.04121.06
5.6.180.0070.03821.04
5.6.170.0070.03821.01
5.6.160.0100.03520.84
5.6.150.0000.05020.78
5.6.140.0060.03820.84
5.6.130.0000.04420.81
5.6.120.0030.04720.87
5.6.110.0070.04620.73
5.6.100.0030.07921.04
5.6.90.0000.05321.04
5.6.80.0000.04020.35
5.6.70.0100.04020.31
5.6.60.0030.04820.41
5.6.50.0030.03820.24
5.6.40.0030.03720.11
5.6.30.0270.02320.40
5.6.20.0030.05520.36
5.6.10.0030.04520.27
5.6.00.0070.03720.17
5.5.380.0030.03817.64
5.5.370.0030.04017.64
5.5.360.0030.06217.63
5.5.350.0030.04917.47
5.5.340.0030.04317.86
5.5.330.0030.03818.10
5.5.320.0030.03918.18
5.5.310.0030.06118.04
5.5.300.0030.05118.18
5.5.290.0000.04318.03
5.5.280.0000.05718.13
5.5.270.0030.04518.17
5.5.260.0000.04318.12
5.5.250.0030.04317.67
5.5.240.0030.04117.43
5.5.230.0030.04117.12
5.5.220.0070.03717.40
5.5.210.0000.04417.52
5.5.200.0000.04317.38
5.5.190.0000.05217.39
5.5.180.0030.04017.08
5.5.160.0000.04117.48
5.5.150.0060.04417.40
5.5.140.0030.06017.37
5.5.130.0070.04317.19
5.5.120.0070.03317.44
5.5.110.0000.04217.35
5.5.100.0070.03517.34
5.5.90.0040.03917.35
5.5.80.0060.03917.43
5.5.70.0030.04717.34
5.5.60.0070.03616.98
5.5.50.0100.03917.27
5.5.40.0200.04317.33
5.5.30.0040.03917.37
5.5.20.0030.03617.24
5.5.10.0030.03717.36
5.5.00.0030.03817.23
5.4.450.0000.07119.31
5.4.440.0060.03819.31
5.4.430.0100.03319.54
5.4.420.0000.04519.53
5.4.410.0030.03719.13
5.4.400.0000.07319.18
5.4.390.0000.04419.07
5.4.380.0000.04419.25
5.4.370.0000.03919.23
5.4.360.0060.04218.99
5.4.350.0030.04419.09
5.4.340.0070.03618.99
5.4.320.0000.04019.04
5.4.310.0030.05219.09
5.4.300.0070.05719.08
5.4.290.0100.03318.99
5.4.280.0060.04518.98
5.4.270.0040.03919.06
5.4.260.0060.03818.93
5.4.250.0030.08019.07
5.4.240.0000.06419.07
5.4.230.0060.03918.95
5.4.220.0190.04219.19
5.4.210.0030.04319.24
5.4.200.0000.05419.07
5.4.190.0030.03918.95
5.4.180.0030.04319.08
5.4.170.0070.03418.97
5.4.160.0100.06819.05
5.4.150.0030.03818.93
5.4.140.0000.04316.82
5.4.130.0070.05416.73
5.4.120.0070.03216.82
5.4.110.0000.04216.77
5.4.100.0030.03516.69
5.4.90.0000.03716.63
5.4.80.0030.03616.68
5.4.70.0060.03516.74
5.4.60.0070.07316.47
5.4.50.0030.03516.46
5.4.40.0040.03516.66
5.4.30.0000.04116.72
5.4.20.0030.03416.72
5.4.10.0030.04816.61
5.4.00.0030.05015.99
5.3.290.0000.04515.02
5.3.280.0030.03714.88
5.3.270.0030.04114.66
5.3.260.0000.04014.79
5.3.250.0040.03614.79
5.3.240.0000.04714.79
5.3.230.0000.04114.63
5.3.220.0030.03614.87
5.3.210.0030.05514.75
5.3.200.0060.03214.85
5.3.190.0000.06514.85
5.3.180.0030.04014.85
5.3.170.0000.04514.84
5.3.160.0030.05314.84
5.3.150.0000.05614.75
5.3.140.0060.03214.61
5.3.130.0000.08814.46
5.3.120.0040.03514.79
5.3.110.0000.04514.55
5.3.100.0330.02714.46
5.3.90.0000.04014.46
5.3.80.0030.03714.46
5.3.70.0000.03614.46
5.3.60.0030.04514.46
5.3.50.0030.03314.46
5.3.40.0030.03514.46
5.3.30.0030.03514.46
5.3.20.0030.04214.46
5.3.10.0030.03414.46
5.3.00.0000.03914.46
5.2.170.0070.02714.46
5.2.160.0030.02914.46
5.2.150.0060.04514.46
5.2.140.0000.03814.46
5.2.130.0030.03014.46
5.2.120.0030.02814.46
5.2.110.0030.02814.46
5.2.100.0030.03314.46
5.2.90.0110.02514.46
5.2.80.0030.03314.46
5.2.70.0000.03214.46
5.2.60.0030.02714.46
5.2.50.0030.02814.46
5.2.40.0000.03014.46
5.2.30.0030.02914.46
5.2.20.0000.03114.46
5.2.10.0030.04114.46
5.2.00.0030.04414.46
5.1.60.0030.03214.46
5.1.50.0000.03314.46
5.1.40.0040.02214.46
5.1.30.0000.02914.46
5.1.20.0030.03614.46
5.1.10.0030.03814.46
5.1.00.0030.02714.46
5.0.50.0030.02014.46
5.0.40.0070.04114.46
5.0.30.0060.02814.46
5.0.20.0060.01514.46
5.0.10.0030.02014.46
5.0.00.0030.04514.46
4.4.90.0030.01314.46
4.4.80.0000.02314.46
4.4.70.0000.01714.46
4.4.60.0110.01114.46
4.4.50.0000.01914.46
4.4.40.0030.02714.46
4.4.30.0000.01814.46
4.4.20.0000.01814.46
4.4.10.0030.01314.46
4.4.00.0070.04914.46
4.3.110.0030.02814.46
4.3.100.0030.01414.46
4.3.90.0000.02014.46
4.3.80.0000.03214.46
4.3.70.0030.01514.46
4.3.60.0000.01814.46
4.3.50.0060.01214.46
4.3.40.0030.02414.46
4.3.30.0000.02014.46
4.3.20.0000.01814.46
4.3.10.0000.02014.46
4.3.00.0060.01514.46

preferences:
39.86 ms | 401 KiB | 5 Q