3v4l.org

run code in 500+ PHP versions simultaneously
<?php class UrlConcrete { /** * @param DateTimeInterface|DateTime|null $lastmod * * @return UrlConcrete */ public function setLastmod($lastmod = null) { if (!($lastmod instanceof \DateTimeInterface || $lastmod instanceof \DateTime)) { $typePassed = is_object($lastmod) ? \get_class($lastmod) : \gettype($lastmod); if (\PHP_MAJOR_VERSION >= 7) { throw new \TypeError('Argument 1 passed to ' . __METHOD__ . "() must be an instance of DateTimeInterface, '$typePassed' given"); } else { \trigger_error('Argument 1 passed to ' . __METHOD__ . "() must be an instance of DateTime, '$typePassed' given", E_USER_ERROR); return $this; } } $this->lastmod = $lastmod; return $this; } } $x = new UrlConcrete(); $x->setLastmod(new \DateTime()); $x->setLastmod(new stdclass());

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.5.30.0100.00719.67
8.5.20.0100.00719.37
8.5.10.0070.01117.08
8.5.00.0130.01020.13
8.4.180.0170.00521.89
8.4.170.0150.00720.54
8.4.160.0160.00523.90
8.4.150.0060.00717.01
8.4.140.0110.01117.86
8.4.130.0040.00418.79
8.4.120.0110.00924.14
8.4.110.0090.00618.98
8.4.100.0040.00418.93
8.4.90.0040.00520.63
8.4.80.0130.00518.94
8.4.70.0110.00820.81
8.4.60.0030.00622.33
8.4.50.0090.01222.04
8.4.40.0070.00719.80
8.4.30.0130.00618.67
8.4.20.0130.00620.73
8.4.10.0110.00819.85
8.3.300.0130.00720.95
8.3.290.0120.00820.86
8.3.280.0100.01120.55
8.3.270.0120.00816.86
8.3.260.0080.00516.78
8.3.250.0120.00618.95
8.3.240.0140.00517.22
8.3.230.0110.00417.00
8.3.220.0120.00718.97
8.3.210.0100.00916.92
8.3.200.0110.00716.85
8.3.190.0070.01220.91
8.3.180.0100.00818.98
8.3.170.0090.00017.35
8.3.160.0030.00617.02
8.3.150.0190.00017.18
8.3.140.0040.00418.99
8.3.130.0090.00917.01
8.3.120.0030.00620.71
8.3.110.0040.00420.94
8.3.100.0000.00824.06
8.3.90.0160.00326.77
8.3.80.0000.00917.97
8.3.70.0110.00716.75
8.3.60.0070.01518.81
8.3.50.0060.01217.76
8.3.40.0070.01119.23
8.3.30.0040.01119.01
8.3.20.0000.00820.98
8.3.10.0080.00021.91
8.3.00.0000.00823.53
8.2.300.0080.01222.21
8.2.290.0060.00620.50
8.2.280.0110.00920.90
8.2.270.0130.00616.88
8.2.260.0070.01117.18
8.2.250.0040.00417.52
8.2.240.0110.00717.40
8.2.230.0000.00922.58
8.2.220.0050.00337.54
8.2.210.0040.00426.77
8.2.200.0050.00518.88
8.2.190.0100.00717.13
8.2.180.0180.00416.74
8.2.170.0140.00722.96
8.2.160.0070.00720.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0060.00319.66
8.2.110.0070.00320.96
8.2.100.0000.01218.22
8.2.90.0030.00718.16
8.2.80.0050.00317.97
8.2.70.0060.00318.03
8.2.60.0040.00418.22
8.2.50.0000.00818.10
8.2.40.0030.00519.18
8.2.30.0050.00219.24
8.2.20.0070.00018.12
8.2.10.0030.00719.22
8.2.00.0040.00419.34
8.1.340.0090.01218.04
8.1.330.0100.00721.69
8.1.320.0080.01122.25
8.1.310.0140.00316.79
8.1.300.0040.00418.16
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0040.00422.41
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00323.97
8.1.230.0110.00022.65
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0070.00317.38
8.1.190.0080.00417.47
8.1.180.0080.00018.10
8.1.170.0030.00618.79
8.1.160.0020.00518.99
8.1.150.0080.00019.01
8.1.140.0070.00019.00
8.1.130.0000.00717.55
8.1.120.0080.00017.69
8.1.110.0030.00617.64
8.1.100.0000.00817.66
8.1.90.0000.00717.59
8.1.80.0040.00417.70
8.1.70.0080.00017.76
8.1.60.0000.00817.64
8.1.50.0050.00217.57
8.1.40.0050.00317.64
8.1.30.0080.00017.65
8.1.20.0060.00317.71
8.1.10.0040.00417.74
8.1.00.0060.00317.63
8.0.300.0040.00419.98
8.0.290.0000.00816.75
8.0.280.0040.00418.43
8.0.270.0000.00717.39
8.0.260.0000.00717.02
8.0.250.0030.00317.23
8.0.240.0070.00017.17
8.0.230.0040.00417.18
8.0.220.0040.00417.16
8.0.210.0000.00717.23
8.0.200.0030.00317.23
8.0.190.0000.00717.29
8.0.180.0040.00417.10
8.0.170.0030.00617.14
8.0.160.0040.00417.21
8.0.150.0060.00317.18
8.0.140.0000.00717.03
8.0.130.0000.00513.55
8.0.120.0070.00017.18
8.0.110.0040.00417.15
8.0.100.0040.00417.25
8.0.90.0000.00817.20
8.0.80.0100.00517.12
8.0.70.0040.00417.31
8.0.60.0040.00416.99
8.0.50.0000.00717.16
8.0.30.0090.01017.24
8.0.20.0060.01417.27
8.0.10.0040.00417.17
8.0.00.0090.01016.91
7.4.330.0030.00315.55
7.4.320.0060.00316.78
7.4.300.0030.00316.78
7.4.290.0000.00716.69
7.4.280.0080.00016.76
7.4.270.0030.00316.79
7.4.260.0030.00516.52
7.4.250.0000.00716.78
7.4.240.0000.00716.65
7.4.230.0040.00416.88
7.4.220.0040.00416.57
7.4.210.0070.00716.75
7.4.200.0040.00416.80
7.4.160.0110.00616.73
7.4.130.0070.01116.78
7.4.120.0030.01716.59
7.4.110.0070.01116.66
7.4.100.0070.01016.54
7.4.90.0210.00016.91
7.4.80.0120.01019.39
7.4.70.0090.00916.86
7.4.60.0070.01116.68
7.4.50.0000.01316.43
7.4.40.0060.01116.77
7.4.00.0070.00715.08
7.3.330.0060.00013.60
7.3.320.0000.00513.46
7.3.310.0000.00716.63
7.3.300.0030.00316.41
7.3.290.0110.00316.58
7.3.280.0100.00916.61
7.3.260.0090.00816.66
7.3.230.0060.01316.77
7.3.210.0030.01316.77
7.3.200.0100.00716.70
7.3.190.0070.01316.58
7.3.180.0100.01316.55
7.3.170.0190.00316.71
7.3.160.0060.00916.64
7.3.60.0060.01114.83
7.3.50.0130.00415.10
7.3.40.0080.00714.81
7.3.30.0150.00614.87
7.3.20.0480.00515.15
7.3.10.0110.00315.03
7.3.00.0140.00714.99
7.2.330.0100.00716.90
7.2.320.0100.00716.79
7.2.310.0100.00716.55
7.2.300.0070.01016.84
7.2.290.0090.00817.04
7.2.190.0110.00915.13
7.2.180.0110.00615.24
7.2.170.0110.00715.26
7.2.160.0080.00515.17
7.2.150.0080.01115.09
7.2.140.0190.00715.03
7.2.130.0200.00315.23
7.2.120.0110.00815.24
7.2.110.0230.00515.26
7.2.100.0090.01015.12
7.2.90.0120.01015.23
7.2.80.0110.01015.21
7.2.70.0110.01115.36
7.2.60.0080.00915.29
7.2.50.0110.01215.43
7.2.40.0110.01115.18
7.2.30.0330.00315.33
7.2.20.0100.00615.42
7.2.10.0130.00315.11
7.2.00.0070.00915.26
7.1.300.0570.00614.26
7.1.290.0120.00514.18
7.1.280.0070.00914.17
7.1.270.0180.00214.03
7.1.260.0160.00514.12
7.1.250.0220.00514.07
7.1.240.0190.01614.14
7.1.230.0230.00714.09
7.1.220.0240.00414.10
7.1.210.0270.01314.25
7.1.200.0100.01314.26
7.1.190.0100.01013.93
7.1.180.0120.01614.20
7.1.170.0150.00814.17
7.1.160.0210.01113.89
7.1.150.0140.01114.13
7.1.140.0280.00414.21
7.1.130.0180.00914.12
7.1.120.0140.00914.11
7.1.110.0220.00314.12
7.1.100.0200.01114.33
7.1.90.0150.00814.11
7.1.80.0160.01314.18
7.1.70.0200.00513.98
7.1.60.0220.00414.17
7.1.50.0170.00914.27
7.1.40.0220.00713.95
7.1.30.0180.00714.20
7.1.20.0240.00714.03
7.1.10.0670.00714.23
7.1.00.0190.00314.03
7.0.330.0220.01513.93
7.0.320.0160.00313.84
7.0.310.0280.00013.76
7.0.300.0230.00313.80
7.0.290.0210.00413.83
7.0.280.0160.01013.86
7.0.270.0280.00013.91
7.0.260.0100.01013.75
7.0.250.0160.00313.88
7.0.240.0260.00213.83
7.0.230.0210.00013.75
7.0.220.0090.01513.70
7.0.210.0180.01914.01
7.0.200.0120.00913.46
7.0.190.0140.00913.59
7.0.180.0300.00613.78
7.0.170.0110.01213.66
7.0.160.0140.01413.61
7.0.150.0180.01613.73
7.0.140.0140.00713.99
7.0.130.0200.00513.73
7.0.120.0190.00613.72
7.0.110.0170.02013.69
7.0.100.0180.00813.95
7.0.90.0130.01013.70
7.0.80.0180.00313.84
7.0.70.0190.01013.85
7.0.60.0210.00613.64
7.0.50.0190.00513.99
7.0.40.0150.00413.91
7.0.30.0180.00813.87
7.0.20.0180.00413.88
7.0.10.0140.01113.71
7.0.00.0130.00513.69
5.6.400.0170.00714.43
5.6.390.0090.01314.36
5.6.380.0190.01014.29
5.6.370.0130.01314.11
5.6.360.0170.00614.26
5.6.350.0110.01714.41
5.6.340.0130.01014.10
5.6.330.0110.00814.66
5.6.320.0100.00514.45
5.6.310.0130.00914.51
5.6.300.0000.01814.51
5.6.290.0120.00814.78
5.6.280.0140.00414.63
5.6.270.0210.00514.61
5.6.260.0220.00614.56
5.6.250.0090.01214.63
5.6.240.0050.01414.29
5.6.230.0110.01014.37
5.6.220.0160.01014.61
5.6.210.0170.00814.46
5.6.200.0230.00314.70
5.6.190.0080.01914.36
5.6.180.0120.00414.13
5.6.170.0150.00514.21
5.6.160.0180.01114.53
5.6.150.0130.01314.54
5.6.140.0160.00814.63
5.6.130.0170.00314.47
5.6.120.0090.01614.39
5.6.110.0050.01914.57
5.6.100.0210.01114.59
5.6.90.0160.00614.37
5.6.80.0150.00414.48
5.6.70.0110.01114.65
5.6.60.0160.00314.34
5.6.50.0130.01114.45
5.6.40.0140.01114.63
5.6.30.0070.01514.49
5.6.20.0110.00814.33
5.6.10.0180.00914.58
5.6.00.0180.00014.57
5.5.380.0110.00814.63
5.5.370.0080.01414.61
5.5.360.0170.00614.61
5.5.350.0150.00014.43
5.5.340.0120.00414.48
5.5.330.0080.00814.44
5.5.320.0190.00814.30
5.5.310.0110.00814.45
5.5.300.0120.00814.50
5.5.290.0130.01014.19
5.5.280.0150.00314.40
5.5.270.0130.01014.41
5.5.260.0150.00814.23
5.5.250.0120.00414.20
5.5.240.0000.01814.48
5.5.230.0080.01314.40
5.5.220.0160.00514.47
5.5.210.0120.00614.30
5.5.200.0150.00414.47
5.5.190.0190.00014.27
5.5.180.0080.01214.34
5.5.170.0150.00314.29
5.5.160.0080.00814.44
5.5.150.0170.00014.48
5.5.140.0150.00914.39
5.5.130.0070.01814.25
5.5.120.0150.00814.41
5.5.110.0170.01014.02
5.5.100.0090.00614.21
5.5.90.0100.00714.16
5.5.80.0180.00314.38
5.5.70.0180.00914.00
5.5.60.0150.01513.84
5.5.50.0040.01414.32
5.5.40.0120.00613.98
5.5.30.0190.00914.25
5.5.20.0130.00614.41
5.5.10.0150.00814.57
5.5.00.0150.00414.41
5.4.450.0000.01011.12
5.4.440.0130.00610.92
5.4.430.0040.01111.23
5.4.420.0080.00811.07
5.4.410.0050.00911.19
5.4.400.0100.00311.16
5.4.390.0040.00911.08
5.4.380.0150.00311.27
5.4.370.0070.00711.21
5.4.360.0080.00411.31
5.4.350.0090.00310.90
5.4.340.0060.00611.15
5.4.330.0040.00711.22
5.4.320.0090.00211.13
5.4.310.0130.00010.69
5.4.300.0080.01111.09
5.4.290.0120.00910.97
5.4.280.0110.00710.68
5.4.270.0070.00411.04
5.4.260.0110.00711.43
5.4.250.0030.01110.87
5.4.240.0080.00511.11
5.4.230.0050.00911.22
5.4.220.0100.00211.18
5.4.210.0070.00711.29
5.4.200.0060.00611.34
5.4.190.0140.00411.28
5.4.180.0080.00411.43
5.4.170.0100.00311.19
5.4.160.0100.00711.26
5.4.150.0130.00311.38
5.4.140.0110.01111.31
5.4.130.0070.00711.22
5.4.120.0100.00311.32
5.4.110.0060.00611.06
5.4.100.0150.00711.25
5.4.90.0050.01011.36
5.4.80.0100.00511.35
5.4.70.0130.00311.35
5.4.60.0140.00311.38
5.4.50.0140.00511.38
5.4.40.0110.00011.33
5.4.30.0130.00511.45
5.4.20.0150.00011.35
5.4.10.0100.00211.40
5.4.00.0160.00411.21
5.3.290.0090.00710.77
5.3.280.0150.00410.86
5.3.270.0090.00310.91
5.3.260.0110.00010.85
5.3.250.0050.00910.89
5.3.240.0070.00410.87
5.3.230.0100.00010.74
5.3.220.0070.00310.62
5.3.210.0060.00910.50
5.3.200.0060.00710.61
5.3.190.0070.00310.80
5.3.180.0090.00010.91
5.3.170.0080.00910.84
5.3.160.0050.01010.70
5.3.150.0080.00010.77
5.3.140.0040.01210.86
5.3.130.0000.01010.82
5.3.120.0030.00710.80
5.3.110.0000.00910.55
5.3.100.0040.01110.79
5.3.90.0060.00310.91
5.3.80.0030.01510.55
5.3.70.0090.00610.77
5.3.60.0100.00010.88
5.3.50.0110.00510.74
5.3.40.0040.01110.65
5.3.30.0070.01010.89
5.3.20.0130.00010.65
5.3.10.0070.00010.58
5.3.00.0090.00610.46
5.2.170.0090.00910.44
5.2.160.0150.00410.44
5.2.150.0040.00910.44
5.2.140.0050.00710.44
5.2.130.0180.00310.44
5.2.120.0120.00210.44
5.2.110.0050.00510.44
5.2.100.0100.00410.44
5.2.90.0120.00610.44
5.2.80.0090.00510.44
5.2.70.0070.00410.44
5.2.60.0090.00310.44
5.2.50.0080.01110.44
5.2.40.0090.00210.44
5.2.30.0120.00610.44
5.2.20.0180.00010.44
5.2.10.0000.01510.44
5.2.00.0040.00810.44
5.1.60.0060.00310.44
5.1.50.0030.00610.44
5.1.40.0060.00310.44
5.1.30.0110.00610.44
5.1.20.0050.00510.44
5.1.10.0080.00010.44
5.1.00.0100.00010.44
5.0.50.0110.00010.44
5.0.40.0070.00410.44
5.0.30.0050.00510.44
5.0.20.0070.00010.44
5.0.10.0060.00010.44
5.0.00.0080.00010.44
4.4.90.0090.00310.44
4.4.80.0040.00410.44
4.4.70.0040.00210.44
4.4.60.0100.00310.44
4.4.50.0090.00010.44
4.4.40.0040.00510.44
4.4.30.0000.00610.44
4.4.20.0050.00310.44
4.4.10.0050.00610.44
4.4.00.0050.00510.44
4.3.110.0070.00010.44
4.3.100.0070.00010.44
4.3.90.0000.00510.44
4.3.80.0050.00510.44
4.3.70.0070.00710.44
4.3.60.0060.00010.44
4.3.50.0000.00510.44
4.3.40.0070.00010.44
4.3.30.0020.00210.44
4.3.20.0030.00310.44
4.3.10.0070.00010.44
4.3.00.0050.00010.44

preferences:
97.99 ms | 2654 KiB | 5 Q