3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Box{ protected $type, $ref; function __construct($type, &$var){ $this->type = $type; $this->ref = &$var; } function __set($name, $data){ $this->ref = [$this->type, "__box"]($data); } } function §($type, &$var){ return new Box($type, $var); } // --------- class UString{ function __construct($data){ $this->data = $data; } static function __box($data){ if(is_string($data)) return new static($data); throw new Error; } } const UString = UString::CLASS; // --------- §(UString, $bar)->set = "ùnìcòdè"; var_dump($bar);

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.0140.01018.43
8.3.60.0110.00718.55
8.3.50.0150.00322.14
8.3.40.0110.00418.61
8.3.30.0130.01019.21
8.3.20.0050.00318.69
8.3.10.0040.00423.59
8.3.00.0000.00819.20
8.2.190.0070.01416.63
8.2.180.0070.01416.75
8.2.170.0150.00622.96
8.2.160.0070.00722.13
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.06
8.2.110.0030.00620.27
8.2.100.0080.00417.84
8.2.90.0030.00619.40
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0040.00417.89
8.2.50.0060.00318.07
8.2.40.0060.00320.00
8.2.30.0000.00817.98
8.2.20.0040.00417.57
8.2.10.0000.00817.98
8.2.00.0000.00718.15
8.1.280.0070.01325.92
8.1.270.0100.01020.22
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.77
8.1.230.0110.00022.12
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0040.00417.48
8.1.190.0030.00517.25
8.1.180.0040.00418.10
8.1.170.0040.00420.36
8.1.160.0000.00722.02
8.1.150.0060.00318.91
8.1.140.0040.00417.43
8.1.130.0000.00717.74
8.1.120.0080.00017.52
8.1.110.0050.00317.52
8.1.100.0070.00317.41
8.1.90.0040.00417.47
8.1.80.0000.00717.41
8.1.70.0000.00717.46
8.1.60.0070.00017.65
8.1.50.0040.00417.57
8.1.40.0040.00417.50
8.1.30.0030.00517.65
8.1.20.0050.00317.70
8.1.10.0040.00417.56
8.1.00.0000.00817.54
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0040.00418.46
8.0.270.0070.00017.27
8.0.260.0050.00317.27
8.0.250.0070.00016.85
8.0.240.0030.00316.88
8.0.230.0080.00016.93
8.0.220.0070.00016.81
8.0.210.0000.00716.90
8.0.200.0070.00016.88
8.0.190.0000.00817.00
8.0.180.0000.00716.92
8.0.170.0050.00316.97
8.0.160.0040.00416.85
8.0.150.0000.00716.98
8.0.140.0050.00316.87
8.0.130.0030.00313.33
8.0.120.0000.00816.89
8.0.110.0000.00716.86
8.0.100.0030.00516.94
8.0.90.0040.00416.77
8.0.80.0030.01316.93
8.0.70.0040.00416.88
8.0.60.0000.00816.86
8.0.50.0020.00516.84
8.0.30.0080.01316.87
8.0.20.0080.01117.40
8.0.10.0000.00716.91
8.0.00.0080.00916.78
7.4.330.0030.00515.03
7.4.320.0030.00316.59
7.4.300.0030.00316.61
7.4.290.0000.00716.52
7.4.280.0040.00416.53
7.4.270.0070.00016.46
7.4.260.0050.00316.39
7.4.250.0070.00016.48
7.4.240.0050.00216.59
7.4.230.0000.00716.51
7.4.220.0090.01216.57
7.4.210.0090.00616.48
7.4.200.0000.00716.59
7.4.160.0040.01116.42
7.4.150.0200.00317.40
7.4.140.0150.01117.86
7.4.130.0110.01116.56
7.4.120.0120.00616.53
7.4.110.0090.00916.46
7.4.100.0070.01416.54
7.4.90.0090.00916.64
7.4.80.0100.00719.39
7.4.70.0070.01616.59
7.4.60.0040.01216.34
7.4.50.0000.00916.45
7.4.40.0130.00916.36
7.4.30.0100.00716.38
7.4.10.0080.01116.39
7.4.00.0070.01015.66
7.3.330.0060.00013.33
7.3.320.0050.00013.29
7.3.310.0040.00416.21
7.3.300.0030.00316.32
7.3.290.0070.01016.32
7.3.280.0090.01016.30
7.3.270.0030.01317.40
7.3.260.0070.01016.56
7.3.250.0080.01116.30
7.3.240.0070.01116.58
7.3.230.0110.00716.41
7.3.210.0060.01216.49
7.3.200.0050.01119.39
7.3.190.0030.01316.64
7.3.180.0110.00616.34
7.3.170.0100.01316.59
7.3.160.0110.00516.51
7.3.130.0030.01516.14
7.3.120.0060.00916.38
7.3.110.0070.00716.51
7.3.100.0070.00316.55
7.3.90.0040.01116.43
7.3.80.0060.01016.48
7.3.70.0030.01316.48
7.3.60.0030.01216.34
7.3.50.0030.00916.36
7.3.40.0030.01316.24
7.3.30.0110.00416.31
7.3.20.0090.00318.13
7.3.10.0050.00917.49
7.3.00.0040.01017.31
7.2.330.0060.01316.82
7.2.320.0120.01216.39
7.2.310.0140.00716.81
7.2.300.0110.00616.80
7.2.290.0110.00916.78
7.2.260.0130.00616.56
7.2.250.0030.01316.30
7.2.240.0040.01216.48
7.2.230.0090.00616.66
7.2.220.0000.01516.73
7.2.210.0000.01616.74
7.2.200.0070.01016.55
7.2.190.0110.00816.61
7.2.180.0060.01216.50
7.2.170.0040.01016.32
7.2.160.0030.00916.56
7.2.150.0090.00318.43
7.2.140.0040.01118.27
7.2.130.0050.00517.68
7.2.120.0070.00517.75
7.2.110.0040.00717.75
7.2.100.0080.00517.56
7.2.90.0040.01117.57
7.2.80.0070.00817.72
7.2.70.0070.00617.68
7.2.60.0060.00917.27
7.2.50.0020.01117.64
7.2.40.0050.01017.66
7.2.30.0040.01117.70
7.2.20.0050.01017.72
7.2.10.0080.00517.55
7.2.00.0120.00317.56
7.1.330.0070.00717.43
7.1.320.0060.00917.41
7.1.310.0070.00717.64
7.1.300.0000.01517.20
7.1.290.0070.01017.53
7.1.280.0060.00317.14
7.1.270.0100.00317.21
7.1.260.0140.00017.33
7.1.250.0050.00816.53
7.1.240.0040.00817.38
7.1.230.0030.00617.27
7.1.220.0100.01017.17
7.1.210.0000.02017.32
7.1.200.0050.00716.43
7.1.190.0060.00617.28
7.1.180.0110.00417.09
7.1.170.0100.00617.13
7.1.160.0040.01117.18
7.1.150.0050.00517.16
7.1.140.0070.00417.23
7.1.130.0060.00317.38
7.1.120.0060.00617.34
7.1.110.0070.00317.27
7.1.100.0080.00717.57
7.1.90.0110.00617.20
7.1.80.0030.01017.12
7.1.70.0000.01017.10
7.1.60.0180.00825.97
7.1.50.0100.00717.18
7.1.40.0090.00917.37
7.1.30.0070.01117.34
7.1.20.0000.01317.47
7.1.10.0080.00617.19
7.1.00.0050.04019.83
7.0.330.0000.01416.95
7.0.320.0070.00316.96
7.0.310.0070.00716.90
7.0.300.0030.00616.99
7.0.290.0090.00617.04
7.0.280.0120.00017.02
7.0.270.0070.00717.02
7.0.260.0070.00717.02
7.0.250.0070.00316.97
7.0.240.0040.01117.07
7.0.230.0030.01117.00
7.0.220.0100.00316.66
7.0.210.0030.01417.08
7.0.200.0050.00416.91
7.0.190.0140.00017.00
7.0.180.0040.01216.98
7.0.170.0060.01016.98
7.0.160.0040.00916.96
7.0.150.0030.01316.91
7.0.140.0060.00617.02
7.0.130.0030.00717.04
7.0.120.0000.01217.18
7.0.110.0070.00716.99
7.0.100.0030.00716.94
7.0.90.0070.01017.02
7.0.80.0130.00016.88
7.0.70.0060.01216.88
7.0.60.0070.02218.40
7.0.50.0000.02617.42
7.0.40.0070.05217.57
7.0.30.0350.03617.51
7.0.20.0180.04517.63
7.0.10.0110.04517.50
7.0.00.0050.03517.62
5.6.400.0060.00915.70
5.6.390.0040.00915.93
5.6.380.0090.00915.44
5.6.370.0110.00015.58
5.6.360.0030.00616.02
5.6.350.0070.00315.69
5.6.340.0100.00715.50
5.6.330.0030.00715.50
5.6.320.0080.00415.96
5.6.310.0100.00315.70
5.6.300.0030.01015.70
5.6.290.0030.01515.98
5.6.280.0040.04118.36
5.6.270.0070.00315.67
5.6.260.0000.01115.62
5.6.250.0070.01315.58
5.6.240.0070.01015.71
5.6.230.0030.01315.57
5.6.220.0070.01015.67
5.6.210.0060.04318.06
5.6.200.0100.04416.96
5.6.190.0080.03318.01
5.6.180.0130.02918.10
5.6.170.0130.02818.13
5.6.160.0110.04418.04
5.6.150.0090.04417.01
5.6.140.0070.03016.82
5.6.130.0130.02716.83
5.6.120.0120.04418.36
5.6.110.0110.04118.33
5.6.100.0080.04418.36
5.6.90.0130.03518.35
5.6.80.0050.04717.88
5.6.70.2130.02517.98
5.6.60.0100.00315.39
5.6.50.0100.00315.41
5.6.40.0090.00915.45
5.6.30.0040.01315.47
5.6.20.0030.00615.57
5.6.10.0080.00415.48
5.6.00.0110.00715.46
5.5.380.0040.01215.60
5.5.370.0070.00715.70
5.5.360.0100.01015.66
5.5.350.0110.02517.98
5.5.340.0080.04416.67
5.5.330.0070.03717.98
5.5.320.0220.03917.86
5.5.310.0170.02517.89
5.5.300.0110.03516.74
5.5.290.0050.03116.79
5.5.280.0050.03718.17
5.5.270.0050.03218.07
5.5.260.0060.04418.28
5.5.250.0070.03017.95
5.5.240.0170.03517.85
5.5.230.0070.00715.38
5.5.220.0040.00815.33
5.5.210.0090.00315.54
5.5.200.0040.01515.43
5.5.190.0070.01115.46
5.5.180.0150.00015.50
5.5.170.0070.00715.44
5.5.160.0040.01115.58
5.5.150.0030.01415.42
5.5.140.0100.00715.57
5.5.130.0110.00415.13
5.5.120.0040.00815.52
5.5.110.0000.01215.30
5.5.100.0060.00615.53
5.5.90.0040.00715.24
5.5.80.0040.01115.26
5.5.70.0130.00615.32
5.5.60.0050.01015.40
5.5.50.0070.01115.52
5.5.40.0070.00715.13
5.5.30.0090.00315.40
5.5.20.0070.00715.49
5.5.10.0090.00615.36
5.5.00.0030.00815.51
5.4.450.0960.02216.00
5.4.440.0920.02415.91
5.4.430.1050.02415.98
5.4.420.0970.02616.02
5.4.410.0900.02515.88
5.4.400.0970.02115.83
5.4.390.1030.02915.85
5.4.380.1100.01815.85
5.4.370.0960.02315.77
5.4.360.1020.02215.81
5.4.350.1060.02615.81
5.4.340.1070.02515.83
5.4.330.0030.00912.47
5.4.320.1000.02715.83
5.4.310.1050.02315.65
5.4.300.0980.01715.72
5.4.290.1100.02415.73
5.4.280.1100.02215.73
5.4.270.0980.02015.67
5.4.260.0980.02015.72
5.4.250.0980.02215.76
5.4.240.1080.02115.75
5.4.230.1110.02115.74
5.4.220.0980.02015.72
5.4.210.1030.02015.77
5.4.200.1000.02315.65
5.4.190.1100.02215.77
5.4.180.1090.02415.77
5.4.170.1000.02315.72
5.4.160.1030.02615.79
5.4.150.0960.02115.83
5.4.140.0930.02314.45
5.4.130.0970.02014.40
5.4.120.1060.01214.38
5.4.110.1010.02214.47
5.4.100.1030.02314.51
5.4.90.1030.02314.54
5.4.80.1230.02314.50
5.4.70.0980.02214.45
5.4.60.1180.02514.36
5.4.50.1140.01914.40
5.4.40.0990.02214.42
5.4.30.1070.01914.49
5.4.20.1070.01714.49
5.4.10.1010.02014.47
5.4.00.1000.02114.10
5.3.290.2130.04314.64
5.3.280.2130.04014.49
5.3.270.2030.04014.62
5.3.260.1970.03014.61
5.3.250.1870.04014.83
5.3.240.2170.03714.50
5.3.230.1900.03314.61
5.3.220.1800.03714.68
5.3.210.2130.02714.55
5.3.200.2030.03714.65
5.3.190.1970.04014.62
5.3.180.1830.03714.47
5.3.170.2000.04714.52
5.3.160.2100.04014.61
5.3.150.2130.05014.79
5.3.140.2100.03714.78
5.3.130.1970.04714.55
5.3.120.2130.03714.52
5.3.110.2200.03714.55
5.3.100.2170.04014.05
5.3.90.2200.04313.93
5.3.80.1830.04314.09
5.3.70.2070.04713.94
5.3.60.1900.03713.92
5.3.50.1330.04714.09
5.3.40.1370.03013.95
5.3.30.1730.03314.06
5.3.20.1930.04313.70
5.3.10.1770.03313.57
5.3.00.1700.03013.66
5.2.170.1530.02011.37
5.2.160.1430.02711.13
5.2.150.1800.04011.07
5.2.140.1730.02711.15
5.2.130.1600.02711.16
5.2.120.1500.02711.19
5.2.110.1430.03011.11
5.2.100.1500.03011.08
5.2.90.1470.03011.02
5.2.80.1870.03711.05
5.2.70.1470.03011.25
5.2.60.1570.03710.97
5.2.50.1730.03711.23
5.2.40.1330.02311.07
5.2.30.1200.03311.12
5.2.20.1100.03710.87
5.2.10.0000.04310.79
5.2.00.0030.05010.64
5.1.60.0000.03310.05
5.1.50.0000.0279.90
5.1.40.0100.0239.96
5.1.30.1400.03010.23
5.1.20.1500.03010.26
5.1.10.1270.02710.30
5.1.00.0970.0279.97
5.0.50.0700.0238.46
5.0.40.0630.0208.64
5.0.30.0730.0378.30
5.0.20.0600.0238.09
5.0.10.0670.0338.05
5.0.00.0570.0338.29
4.4.90.0630.0137.72
4.4.80.0630.0177.72
4.4.70.0630.0177.72
4.4.60.0430.0207.72
4.4.50.0670.0177.72
4.4.40.0730.0277.72
4.4.30.0600.0177.72
4.4.20.0630.0137.72
4.4.10.0670.0207.72
4.4.00.0570.0277.72
4.3.110.0600.0177.72
4.3.100.0670.0107.72
4.3.90.0770.0237.72
4.3.80.0730.0277.72
4.3.70.0530.0207.72
4.3.60.0770.0207.72
4.3.50.0630.0137.72
4.3.40.0800.0377.72
4.3.30.0330.0207.72
4.3.20.0330.0177.72
4.3.10.0300.0177.72
4.3.00.0270.0177.72

preferences:
24.61 ms | 401 KiB | 5 Q