3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Value{ pulbic static function check(){ return true; } } class MyClass{ public $value; public __construct(){ $this->value = 'My Class'; if(Value::check()) { $this->value = 'My Class 2'; } } } class MyClass2{ public $value; public __construct(){ $this->value = 'My Class 2'; } } $class = new MyClass(); var_dump($class->value);

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)
5.4.350.0080.04212.03
5.4.340.0090.05312.02
5.4.320.0090.03612.51
5.4.310.0090.03912.50
5.4.300.0050.03912.50
5.4.290.0060.03812.50
5.4.280.0070.04112.40
5.4.270.0070.04012.40
5.4.260.0070.03812.40
5.4.250.0050.04012.40
5.4.240.0050.03812.40
5.4.230.0060.04012.39
5.4.220.0100.05012.39
5.4.210.0070.05812.39
5.4.200.0130.06012.39
5.4.190.0110.04612.39
5.4.180.0070.04612.39
5.4.170.0060.04012.39
5.4.160.0110.03812.39
5.4.150.0090.04012.39
5.4.140.0130.05812.08
5.4.130.0110.06012.06
5.4.120.0140.04312.03
5.4.110.0100.04212.02
5.4.100.0060.04412.02
5.4.90.0130.05512.02
5.4.80.0100.03712.02
5.4.70.0070.04012.02
5.4.60.0090.03812.02
5.4.50.0120.04112.02
5.4.40.0090.06212.01
5.4.30.0130.05612.00
5.4.20.0090.03812.00
5.4.10.0050.04712.01
5.4.00.0130.06111.50
5.3.290.0070.05512.80
5.3.280.0140.05212.71
5.3.270.0240.09012.72
5.3.260.0210.11912.72
5.3.250.0080.05212.72
5.3.240.0350.13412.72
5.3.230.0110.04812.70
5.3.220.0140.06412.68
5.3.210.0120.05012.68
5.3.200.0140.06312.68
5.3.190.0100.04612.68
5.3.180.0140.05012.68
5.3.170.0100.04512.67
5.3.160.0050.04412.67
5.3.150.0190.06712.68
5.3.140.0100.04212.66
5.3.130.0050.04812.66
5.3.120.0080.04512.66
5.3.110.0090.06412.66
5.3.100.0130.04112.12
5.3.90.0140.05212.10
5.3.80.0070.05012.09
5.3.70.0090.06012.09
5.3.60.0110.03812.07
5.3.50.0120.04712.02
5.3.40.0060.05312.02
5.3.30.0120.04011.98
5.3.20.0200.09511.76
5.3.10.0200.06111.73
5.3.00.0060.05211.71
5.2.170.0040.0319.21
5.2.160.0060.0299.21
5.2.150.0050.0319.21
5.2.140.0040.0319.21
5.2.130.0070.0279.17
5.2.120.0030.0329.17
5.2.110.0050.0299.18
5.2.100.0070.0269.17
5.2.90.0060.0279.17
5.2.80.0060.0299.16
5.2.70.0080.0399.17
5.2.60.0080.0409.13
5.2.50.0090.0379.09
5.2.40.0070.0439.07
5.2.30.0090.0389.04
5.2.20.0090.0299.04
5.2.10.0030.0348.95
5.2.00.0070.0318.81
5.1.60.0060.0328.09
5.1.50.0060.0238.08
5.1.40.0020.0278.07
5.1.30.0070.0258.41
5.1.20.0050.0278.44
5.1.10.0030.0278.16
5.1.00.0020.0328.16
5.0.50.0040.0206.64
5.0.40.0010.0226.50
5.0.30.0130.0466.31
5.0.20.0050.0206.28
5.0.10.0030.0306.26
5.0.00.0030.0316.25
4.4.90.0030.0194.78
4.4.80.0040.0164.75
4.4.70.0000.0204.76
4.4.60.0060.0174.75
4.4.50.0030.0224.77
4.4.40.0040.0334.71
4.4.30.0050.0204.76
4.4.20.0040.0214.84
4.4.10.0040.0224.85
4.4.00.0060.0304.75
4.3.110.0050.0194.67
4.3.100.0040.0184.66
4.3.90.0040.0134.64
4.3.80.0030.0264.58
4.3.70.0070.0114.63
4.3.60.0020.0164.62
4.3.50.0040.0154.63
4.3.40.0010.0274.54
4.3.30.0030.0183.30
4.3.20.0020.0213.28
4.3.10.0020.0213.23
4.3.00.0130.0236.76

preferences:
144.33 ms | 1394 KiB | 7 Q