3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { /** * @JMS\Type("double") * * @var float */ protected $price; /** * @JMS\Type("string") * * @var string */ protected $priceTag; /** * @JMS\Type("DateTime<'h:i'>") * * @var \DateTime */ protected $time; /** * @param float $price * * @return $this */ public function setPrice($price) { $this->price = $price; return $this; } /** * @return float */ public function getPrice() { return $this->price; } /** * @param string $priceTag * * @return $this */ public function setPriceTag($priceTag) { $this->priceTag = $priceTag; return $this; } /** * @return string */ public function getPriceTag() { return $this->priceTag; } /** * @param \DateTime $time * * @return $this */ public function setTime($time) { $this->time = $time; return $this; } /** * @return \DateTime */ public function getTime() { return $this->time; } } $foo = new MyClass(); $foo->setPriceTag('test1'); $bar = new MyClass(); $bar->setPriceTag('test1'); $bam = new MyClass(); $bam->setPriceTag('test2'); $test = array($foo, $bar, $bam); print_r(array_unique($test, SORT_REGULAR));

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.0040.01218.18
8.3.50.0080.00722.05
8.3.40.0120.00318.71
8.3.30.0140.00319.04
8.3.20.0000.00720.39
8.3.10.0050.00323.57
8.3.00.0000.00819.56
8.2.180.0000.01518.42
8.2.170.0040.01122.96
8.2.160.0110.00320.25
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0080.00019.48
8.2.110.0100.00022.15
8.2.100.0070.00717.78
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0050.00317.93
8.2.50.0080.00018.07
8.2.40.0060.00318.09
8.2.30.0060.00418.31
8.2.20.0040.00417.57
8.2.10.0070.00018.12
8.2.00.0040.00419.52
8.1.280.0070.00725.92
8.1.270.0060.00323.87
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0070.00323.91
8.1.230.0030.00719.10
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.38
8.1.190.0050.00317.13
8.1.180.0000.00818.10
8.1.170.0030.00518.65
8.1.160.0000.00822.05
8.1.150.0020.00518.88
8.1.140.0060.00317.52
8.1.130.0030.00317.70
8.1.120.0030.00717.45
8.1.110.0000.00817.38
8.1.100.0000.00717.46
8.1.90.0050.00317.52
8.1.80.0000.00717.35
8.1.70.0000.00717.39
8.1.60.0040.00417.57
8.1.50.0000.00917.44
8.1.40.0000.00817.51
8.1.30.0030.00617.48
8.1.20.0050.00317.54
8.1.10.0040.00417.54
8.1.00.0060.00317.49
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0000.00718.33
8.0.270.0070.00017.27
8.0.260.0030.00317.27
8.0.250.0000.00717.00
8.0.240.0070.00017.01
8.0.230.0030.00316.86
8.0.220.0030.00316.78
8.0.210.0050.00316.94
8.0.200.0040.00416.93
8.0.190.0000.00816.84
8.0.180.0030.00616.84
8.0.170.0080.00016.93
8.0.160.0050.00216.88
8.0.150.0000.00716.75
8.0.140.0040.00416.94
8.0.130.0030.00313.36
8.0.120.0080.00016.76
8.0.110.0040.00416.77
8.0.100.0000.00816.95
8.0.90.0070.00016.93
8.0.80.0000.01716.94
8.0.70.0040.00416.89
8.0.60.0070.00016.92
8.0.50.0000.00716.93
8.0.30.0140.00617.12
8.0.20.0150.00517.43
8.0.10.0000.00716.96
8.0.00.0090.00916.86
7.4.330.0000.00515.08
7.4.320.0000.00716.50
7.4.300.0040.00416.41
7.4.290.0030.00316.53
7.4.280.0000.00816.50
7.4.270.0070.00016.50
7.4.260.0050.00616.56
7.4.250.0070.00016.58
7.4.240.0020.00516.56
7.4.230.0000.00716.71
7.4.220.0090.00916.46
7.4.210.0120.00316.66
7.4.200.0040.00416.53
7.4.160.0090.00916.57
7.4.150.0130.00317.40
7.4.140.0130.00517.86
7.4.130.0080.00916.55
7.4.120.0100.00716.60
7.4.110.0030.01616.65
7.4.100.0150.00916.40
7.4.90.0110.00816.42
7.4.80.0060.01719.39
7.4.70.0130.00316.47
7.4.60.0000.01616.39
7.4.50.0030.00516.63
7.4.40.0090.00616.50
7.4.30.0090.00616.44
7.4.00.0000.01315.19
7.3.330.0060.00013.08
7.3.320.0030.00313.19
7.3.310.0030.00316.29
7.3.300.0070.00016.20
7.3.290.0090.00616.23
7.3.280.0070.01116.24
7.3.270.0080.00817.40
7.3.260.0090.01216.51
7.3.250.0120.00816.51
7.3.240.0100.00716.32
7.3.230.0180.00016.39
7.3.210.0060.01016.22
7.3.200.0030.01219.39
7.3.190.0030.01416.54
7.3.180.0180.00316.23
7.3.170.0000.01516.30
7.3.160.0060.01116.23
7.3.120.0070.00714.79
7.2.330.0040.01516.65
7.2.320.0100.00816.64
7.2.310.0000.01616.40
7.2.300.0140.00316.70
7.2.290.0070.01016.35
7.2.60.0000.01116.91
7.2.00.0110.00719.25
7.1.200.0060.00915.74
7.1.100.0060.00618.19
7.1.70.0000.00817.21
7.1.60.0060.01919.70
7.1.50.0110.01516.96
7.1.00.0000.08022.40
7.0.200.0640.00614.76
7.0.140.0030.07722.01
7.0.60.0030.04020.11
7.0.50.0070.08317.89
7.0.40.0030.09020.14
7.0.30.0230.04720.25
7.0.20.0100.05320.27
7.0.10.0300.07320.21
7.0.00.0070.04320.05
5.6.280.0000.07721.04
5.6.210.0170.07720.47
5.6.200.0000.04318.28
5.6.190.0100.04720.48
5.6.180.0070.08320.63
5.6.170.0170.05320.44
5.6.160.0030.05020.55
5.6.150.0130.06018.27
5.6.140.0030.04718.29
5.6.130.0030.08318.28
5.6.120.0070.04720.99
5.6.110.0230.07021.00
5.6.100.0100.08721.03
5.6.90.0100.08020.98
5.6.80.0070.05320.39
5.6.70.0330.07320.46
5.5.350.0030.08020.41
5.5.340.0030.04717.98
5.5.330.0030.04020.21
5.5.320.0300.07020.26
5.5.310.0200.06320.27
5.5.300.0030.04717.98
5.5.290.0030.08317.95
5.5.280.0070.03720.88
5.5.270.0000.05020.97
5.5.260.0000.05720.77
5.5.250.0100.07020.70
5.5.240.0000.04020.36
5.4.450.3870.04019.53
5.4.440.3870.04019.46
5.4.430.4000.03319.50
5.4.420.3700.04019.45
5.4.410.3970.03319.33
5.4.400.3000.04019.23
5.4.390.2330.03319.25
5.4.380.2900.03719.16
5.4.370.3670.04319.25
5.4.360.3700.03319.15
5.4.350.3230.04019.09
5.4.340.3670.04319.15
5.4.320.3970.03019.20
5.4.310.3900.03318.99
5.4.300.3700.04019.31
5.4.290.3870.03318.84
5.4.280.3900.03719.31
5.4.270.3800.04319.22
5.4.260.3630.04018.99
5.4.250.3930.03018.98
5.4.240.3830.04019.13
5.4.230.3800.04019.14
5.4.220.3900.03719.23
5.4.210.3900.03719.14
5.4.200.3670.04018.99
5.4.190.3930.03319.21
5.4.180.3900.03718.93
5.4.170.3770.04319.23
5.4.160.3870.03719.20
5.4.150.4930.03319.14
5.4.140.3970.03016.53
5.4.130.3870.04016.29
5.4.120.3600.03716.46
5.4.110.3700.03716.56
5.4.100.3830.03716.41
5.4.90.3930.03016.40
5.4.80.4600.03716.44
5.4.70.3530.04016.43
5.4.60.3870.03716.51
5.4.50.3530.04016.33
5.4.40.3600.04316.43
5.4.30.3870.03716.42
5.4.20.3870.03316.34
5.4.10.3470.03016.43
5.4.00.3830.03715.78
5.3.290.3670.03314.66
5.3.280.3430.03714.63
5.3.270.3800.04014.54
5.3.260.3670.03714.61
5.3.250.3370.04014.61
5.3.240.4100.04714.73
5.3.230.3730.03314.60
5.3.220.3630.04014.48
5.3.210.3970.03014.70
5.3.200.4070.04014.58
5.3.190.4130.03714.80
5.3.180.4330.03314.58
5.3.170.3900.03714.59
5.3.160.3870.03014.50
5.3.150.3800.03314.48
5.3.140.3800.03314.56
5.3.130.3830.03314.68
5.3.120.4170.04314.56
5.3.110.3600.04014.63
5.3.100.3500.03714.13
5.3.90.3670.04014.04
5.3.80.3870.04313.93
5.3.70.3770.03713.94
5.3.60.4030.02714.24
5.3.50.3830.03313.96
5.3.40.3630.03313.97
5.3.30.3570.03714.04
5.3.20.3600.03713.61
5.3.10.3530.04713.83
5.3.00.3570.04013.65
5.2.170.3000.03011.41
5.2.160.3230.02711.41
5.2.150.3230.02711.41
5.2.140.3370.02711.41
5.2.130.3100.03011.41
5.2.120.3030.02711.41
5.2.110.3270.02711.41
5.2.100.3000.02711.41
5.2.90.3430.02311.41
5.2.80.3000.03311.41
5.2.70.3430.04311.41
5.2.60.2970.02711.41
5.2.50.3070.03711.41
5.2.40.2500.03011.41
5.2.30.2670.03011.41
5.2.20.2530.02711.41
5.2.10.2770.03311.41
5.2.00.2500.02311.41
5.1.60.2800.03011.41
5.1.50.2470.02011.41
5.1.40.2800.03011.41
5.1.30.2400.02711.41
5.1.20.2470.02011.41
5.1.10.2170.02311.41
5.1.00.2500.02011.41
5.0.50.1200.02011.41
5.0.40.1030.01711.41
5.0.30.0970.03011.41
5.0.20.1230.02711.41
5.0.10.1200.02011.41
5.0.00.1270.02711.41
4.4.90.1430.01711.41
4.4.80.1570.01711.41
4.4.70.1500.01711.41
4.4.60.1070.00711.41
4.4.50.1570.02011.41
4.4.40.1030.02311.41
4.4.30.1230.01311.41
4.4.20.0900.01311.41
4.4.10.1200.01711.41
4.4.00.1170.02711.41
4.3.110.0930.01311.41
4.3.100.1270.01711.41
4.3.90.1200.01311.41
4.3.80.1200.02311.41
4.3.70.0900.01711.41
4.3.60.1230.01311.41
4.3.50.0870.01311.41
4.3.40.1170.02311.41
4.3.30.0570.01711.41
4.3.20.0600.01711.41
4.3.10.0670.01711.41
4.3.00.0670.01311.41

preferences:
47.01 ms | 401 KiB | 5 Q