3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Post { protected $title; protected $text; protected $filters; function __construct($title, $text, $filters) { $this->title = $title; $this->text = $text; $this->filters = $filters; } function get_title() { return htmlspecialchars($this->title); } function display_post() { $text = htmlspecialchars($this->text); foreach ($this->filters as $filter) $text = $filter->filter($text); return $text; } function __destruct() { // debugging stuff $s = "<!-- POST " . htmlspecialchars($this->title); $text = htmlspecialchars($this->text); foreach ($this->filters as $filter) $text = $filter->filter($text); $s = $s . ": " . $text; $s = $s . " -->"; echo $s; } }; echo serialize(new Post("huehuehue i repor u", new SplFileObject("/home/daedalus/flag.txt", [])));

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.0080.00818.30
8.3.50.0150.01021.21
8.3.40.0000.01418.82
8.3.30.0140.00019.12
8.3.20.0080.00020.20
8.3.10.0040.00423.53
8.3.00.0040.00419.24
8.2.180.0110.01116.75
8.2.170.0110.00422.96
8.2.160.0130.00320.39
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0080.00022.18
8.2.110.0060.00321.12
8.2.100.0090.00317.78
8.2.90.0080.00019.08
8.2.80.0040.00417.97
8.2.70.0080.00017.50
8.2.60.0000.00817.91
8.2.50.0090.00018.07
8.2.40.0000.00819.82
8.2.30.0040.00417.89
8.2.20.0040.00417.57
8.2.10.0000.00818.07
8.2.00.0080.00017.57
8.1.280.0060.00925.92
8.1.270.0050.00323.88
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0030.00619.24
8.1.230.0090.00320.95
8.1.220.0080.00017.74
8.1.210.0030.00518.77
8.1.200.0000.00917.23
8.1.190.0000.00917.23
8.1.180.0060.00318.10
8.1.170.0030.00518.42
8.1.160.0040.00421.97
8.1.150.0070.00018.77
8.1.140.0050.00217.34
8.1.130.0040.00419.55
8.1.120.0070.00017.27
8.1.110.0000.00717.36
8.1.100.0000.00817.38
8.1.90.0040.00417.32
8.1.80.0040.00417.34
8.1.70.0030.00317.23
8.1.60.0030.00517.53
8.1.50.0040.00417.44
8.1.40.0030.00517.46
8.1.30.0030.00517.56
8.1.20.0040.00417.60
8.1.10.0040.00417.39
8.1.00.0030.00517.44
8.0.300.0080.00018.77
8.0.290.0000.00716.75
8.0.280.0030.00318.31
8.0.270.0000.00717.07
8.0.260.0060.00017.09
8.0.250.0030.00317.00
8.0.240.0040.00416.83
8.0.230.0040.00416.96
8.0.220.0040.00416.87
8.0.210.0040.00416.90
8.0.200.0000.00716.89
8.0.190.0040.00317.00
8.0.180.0000.00816.96
8.0.170.0040.00416.82
8.0.160.0000.00716.90
8.0.150.0050.00216.76
8.0.140.0050.00316.81
8.0.130.0030.00313.43
8.0.120.0050.00316.86
8.0.110.0020.00516.73
8.0.100.0070.00016.89
8.0.90.0040.00416.70
8.0.80.0040.01116.80
8.0.70.0050.00216.86
8.0.60.0070.00016.79
8.0.50.0000.00816.79
8.0.30.0140.00616.90
8.0.20.0100.00917.40
8.0.10.0040.00416.79
8.0.00.0120.00616.75
7.4.330.0000.00515.02
7.4.320.0030.00316.52
7.4.300.0000.00616.60
7.4.290.0030.00316.45
7.4.280.0040.00416.56
7.4.270.0000.00716.38
7.4.260.0030.00316.59
7.4.250.0040.00416.39
7.4.240.0040.00416.43
7.4.230.0070.00016.66
7.4.220.0070.01116.62
7.4.210.0100.00716.60
7.4.200.0000.00716.30
7.4.160.0090.00616.37
7.4.150.0090.00917.40
7.4.140.0110.00817.86
7.4.130.0060.01016.53
7.4.120.0110.00716.53
7.4.110.0060.01316.38
7.4.100.0100.00716.45
7.4.90.0120.00616.57
7.4.80.0070.01019.39
7.4.70.0160.00016.28
7.4.60.0120.00316.53
7.4.50.0030.00616.55
7.4.40.0100.00716.40
7.4.30.0100.00716.50
7.4.00.0080.00815.08
7.3.330.0000.00613.25
7.3.320.0060.00013.21
7.3.310.0080.00016.28
7.3.300.0000.00716.35
7.3.290.0120.00716.34
7.3.280.0070.01016.39
7.3.270.0100.01017.40
7.3.260.0140.01016.20
7.3.250.0080.00816.57
7.3.240.0070.01416.40
7.3.230.0080.00916.51
7.3.210.0070.01016.52
7.3.200.0060.01219.39
7.3.190.0130.01016.55
7.3.180.0090.00616.34
7.3.170.0060.01116.48
7.3.160.0070.01016.65
7.2.330.0110.00716.36
7.2.320.0090.01516.51
7.2.310.0100.00616.47
7.2.300.0070.01016.59
7.2.290.0160.00616.37
7.2.60.0090.00016.59
7.2.00.0040.01118.99
7.1.200.0080.00315.54
7.1.100.0000.01017.91
7.1.70.0070.00417.18
7.1.60.0070.01419.11
7.1.50.0240.01434.70
7.1.00.0030.07722.40
7.0.200.0000.01016.73
7.0.140.0000.07722.12
7.0.60.0000.06720.11
7.0.50.0070.08317.89
7.0.40.0000.05020.09
7.0.30.0200.05720.07
7.0.20.0330.08320.15
7.0.10.0070.08720.24
7.0.00.0130.07320.15
5.6.280.0130.06321.03
5.6.210.0200.06320.48
5.6.200.0030.04018.23
5.6.190.0000.07720.52
5.6.180.3800.03720.65
5.6.170.0400.06720.57
5.6.160.0070.08720.71
5.6.150.0030.08318.27
5.6.140.0030.04318.18
5.6.130.0000.08718.12
5.6.120.0100.04021.13
5.6.110.0070.08021.15
5.6.100.0070.08321.11
5.6.90.0070.05721.01
5.6.80.0130.07720.46
5.6.70.4300.03720.38
5.5.350.0070.08720.41
5.5.340.0030.05018.05
5.5.330.0000.04720.39
5.5.320.3100.04020.27
5.5.310.0270.07020.23
5.5.300.0070.04317.92
5.5.290.0070.06718.09
5.5.280.0000.05020.66
5.5.270.0070.08720.80
5.5.260.0030.07020.69
5.5.250.0100.04320.79
5.5.240.0100.04020.18
5.4.450.0830.06319.30
5.4.440.0400.06319.30
5.4.430.0130.08019.60
5.4.420.0630.00019.46
5.4.410.0630.00019.41
5.4.400.0630.00019.15
5.4.390.0630.00019.02
5.4.380.0670.00019.09
5.4.370.0830.00019.07
5.4.360.0630.00019.21
5.4.350.0700.00019.16
5.4.340.0040.03612.03
5.4.320.0090.03512.51
5.4.310.0080.04112.50
5.4.300.0030.04012.51
5.4.290.0040.04012.50
5.4.280.0080.04212.40
5.4.270.0050.03612.40
5.4.260.0070.03812.41
5.4.250.0050.04112.40
5.4.240.0050.03612.40
5.4.230.0050.03812.40
5.4.220.0090.03612.40
5.4.210.0080.03212.39
5.4.200.0080.03912.40
5.4.190.0040.04512.39
5.4.180.0050.04012.39
5.4.170.0070.03512.40
5.4.160.0040.03612.40
5.4.150.0070.03512.39
5.4.140.0040.03812.07
5.4.130.0070.03312.06
5.4.120.0050.03512.03
5.4.110.0060.03512.02
5.4.100.0070.03312.02
5.4.90.0050.03712.02
5.4.80.0050.03712.02
5.4.70.0040.03612.02
5.4.60.0040.03612.02
5.4.50.0050.03712.01
5.4.40.0030.03812.00
5.4.30.0060.03812.00
5.4.20.0040.03612.00
5.4.10.0110.03812.00
5.4.00.0060.04311.49
5.3.290.0080.04012.80
5.3.280.0060.03912.71
5.3.270.0120.03512.73
5.3.260.0090.03912.72
5.3.250.0100.04212.72
5.3.240.0050.04012.72
5.3.230.0090.05312.71
5.3.220.0090.03712.68
5.3.210.0050.04112.68
5.3.200.0060.03612.68
5.3.190.0030.04012.68
5.3.180.0090.04012.68
5.3.170.0070.03612.66
5.3.160.0070.03612.67
5.3.150.0040.03812.67
5.3.140.0050.03812.66
5.3.130.0070.03612.66
5.3.120.0060.03812.66
5.3.110.0110.04812.66
5.3.100.0110.03212.13
5.3.90.0040.03712.12
5.3.80.0040.03612.11
5.3.70.0050.03512.11
5.3.60.0040.03612.09
5.3.50.0100.03912.04
5.3.40.0010.04112.04
5.3.30.0090.04412.00
5.3.20.0070.03811.77
5.3.10.0040.03711.75
5.3.00.0020.04411.73
5.2.170.0030.0349.23
5.2.160.0030.0309.23
5.2.150.0030.0349.23
5.2.140.0060.0329.22
5.2.130.0040.0309.19
5.2.120.0030.0319.19
5.2.110.0060.0309.19
5.2.100.0040.0299.18
5.2.90.0060.0339.19
5.2.80.0060.0429.18
5.2.70.0030.0329.19
5.2.60.0050.0319.14
5.2.50.0040.0369.11
5.2.40.0040.0339.09
5.2.30.0050.0299.06
5.2.20.0040.0359.05
5.2.10.0050.0278.96
5.2.00.0070.0398.82
5.1.60.0060.0268.10
5.1.50.0060.0288.10
5.1.40.0060.0278.08
5.1.30.0040.0288.43
5.1.20.0030.0308.45
5.1.10.0010.0298.18
5.1.00.0050.0268.18
5.0.50.0030.0206.65
5.0.40.0020.0216.52
5.0.30.0030.0326.32
5.0.20.0040.0196.29
5.0.10.0020.0216.28
5.0.00.0040.0306.27
4.4.90.0050.0174.78
4.4.80.0030.0154.75
4.4.70.0050.0134.76
4.4.60.0020.0184.76
4.4.50.0010.0174.77
4.4.40.0030.0304.71
4.4.30.0000.0184.76
4.4.20.0030.0154.84
4.4.10.0030.0154.85
4.4.00.0040.0294.76
4.3.110.0040.0174.67
4.3.100.0040.0134.66
4.3.90.0020.0224.64
4.3.80.0050.0284.58
4.3.70.0040.0194.63
4.3.60.0020.0154.63
4.3.50.0050.0164.63
4.3.40.0030.0244.54
4.3.30.0010.0173.30
4.3.20.0020.0163.28
4.3.10.0020.0163.24
4.3.00.0000.0237.90

preferences:
46.15 ms | 401 KiB | 5 Q