3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class EmptySetter { public $foo = NULL; public function __set($name, $value) {} } class NonEmptySetter { public function __set($name, $value) { $this->{$name} = $value; } } function benchmark($obj) { $start_time = microtime(TRUE); for ($i = 0; $i < 10000000; $i++) { $obj->foo = 42; } return microtime(TRUE) - $start_time; } printf("EmptySetter: %.2f seconds\n", benchmark(new EmptySetter)); printf("NonEmptySetter: %.2f seconds\n", benchmark(new NonEmptySetter));
Output for 7.1.0
EmptySetter: 0.15 seconds NonEmptySetter: 0.14 seconds
Output for 7.0.14
EmptySetter: 0.20 seconds NonEmptySetter: 0.17 seconds
Output for 7.0.6
EmptySetter: 0.16 seconds NonEmptySetter: 0.18 seconds
Output for 7.0.5
EmptySetter: 0.16 seconds NonEmptySetter: 0.17 seconds
Output for 7.0.4
EmptySetter: 0.15 seconds NonEmptySetter: 0.18 seconds
Output for 7.0.0, 7.0.2 - 7.0.3
EmptySetter: 0.14 seconds NonEmptySetter: 0.17 seconds
Output for 7.0.1
EmptySetter: 0.15 seconds NonEmptySetter: 0.17 seconds
Output for hhvm-3.12.0
EmptySetter: 0.67 seconds NonEmptySetter: 0.98 seconds
Output for hhvm-3.10.0
EmptySetter: 0.78 seconds NonEmptySetter: 1.10 seconds
Output for 5.6.28
EmptySetter: -0.28 seconds NonEmptySetter: 1.38 seconds
Output for 5.6.21
EmptySetter: 0.55 seconds NonEmptySetter: 0.61 seconds
Output for 5.6.20
EmptySetter: 0.46 seconds NonEmptySetter: 0.55 seconds
Output for 5.6.19
EmptySetter: 0.48 seconds NonEmptySetter: 0.55 seconds
Output for 5.6.18
EmptySetter: 0.48 seconds NonEmptySetter: 0.57 seconds
Output for 5.6.17
EmptySetter: 0.46 seconds NonEmptySetter: 0.54 seconds
Output for 5.6.16
EmptySetter: 0.53 seconds NonEmptySetter: 0.57 seconds
Output for 5.6.10 - 5.6.11, 5.6.15
EmptySetter: 0.50 seconds NonEmptySetter: 0.55 seconds
Output for 5.6.8 - 5.6.9, 5.6.14
EmptySetter: 0.50 seconds NonEmptySetter: 0.56 seconds
Output for 5.6.13
EmptySetter: 0.60 seconds NonEmptySetter: 0.73 seconds
Output for 5.5.31, 5.6.12
EmptySetter: 0.52 seconds NonEmptySetter: 0.55 seconds
Output for 5.6.7
EmptySetter: 0.48 seconds NonEmptySetter: 0.48 seconds
Output for 5.5.24, 5.5.35
EmptySetter: 0.52 seconds NonEmptySetter: 0.54 seconds
Output for 5.5.34
EmptySetter: 0.51 seconds NonEmptySetter: 0.54 seconds
Output for 5.5.33
EmptySetter: 0.49 seconds NonEmptySetter: 0.54 seconds
Output for 5.5.32
EmptySetter: 0.48 seconds NonEmptySetter: 0.53 seconds
Output for 5.5.30
EmptySetter: 0.54 seconds NonEmptySetter: 0.58 seconds
Output for 5.5.29
EmptySetter: 0.50 seconds NonEmptySetter: 0.54 seconds
Output for 5.5.28
EmptySetter: 0.54 seconds NonEmptySetter: 0.59 seconds
Output for 5.5.27
EmptySetter: 0.53 seconds NonEmptySetter: 0.53 seconds
Output for 5.5.25 - 5.5.26
EmptySetter: 0.51 seconds NonEmptySetter: 0.55 seconds
Output for 5.4.45
EmptySetter: 0.75 seconds NonEmptySetter: 0.83 seconds
Output for 5.4.44
EmptySetter: 0.75 seconds NonEmptySetter: 0.82 seconds
Output for 5.4.43
EmptySetter: 0.67 seconds NonEmptySetter: 0.78 seconds
Output for 5.4.42
EmptySetter: 0.70 seconds NonEmptySetter: 0.80 seconds
Output for 5.4.41
EmptySetter: 0.83 seconds NonEmptySetter: 0.97 seconds
Output for 5.4.40
EmptySetter: 0.76 seconds NonEmptySetter: 0.81 seconds
Output for 5.4.39
EmptySetter: 0.74 seconds NonEmptySetter: 0.88 seconds
Output for 5.4.38
EmptySetter: 0.67 seconds NonEmptySetter: 0.97 seconds
Output for 5.4.37
EmptySetter: 0.66 seconds NonEmptySetter: 0.83 seconds
Output for 5.4.36
EmptySetter: 0.74 seconds NonEmptySetter: 1.08 seconds
Output for 5.4.35
EmptySetter: 0.53 seconds NonEmptySetter: 0.61 seconds
Output for 5.4.15, 5.4.34
EmptySetter: 0.51 seconds NonEmptySetter: 0.60 seconds
Output for 5.4.24, 5.4.32
EmptySetter: 0.51 seconds NonEmptySetter: 0.61 seconds
Output for 5.4.31
EmptySetter: 0.49 seconds NonEmptySetter: 0.58 seconds
Output for 5.4.30
EmptySetter: 0.49 seconds NonEmptySetter: 0.59 seconds
Output for 5.4.29
EmptySetter: 0.49 seconds NonEmptySetter: 0.57 seconds
Output for 5.4.28
EmptySetter: 0.51 seconds NonEmptySetter: 0.58 seconds
Output for 5.4.27
EmptySetter: 0.51 seconds NonEmptySetter: 0.62 seconds
Output for 5.4.26
EmptySetter: 0.50 seconds NonEmptySetter: 0.61 seconds
Output for 5.4.25
EmptySetter: 0.52 seconds NonEmptySetter: 0.59 seconds
Output for 5.4.23
EmptySetter: 0.53 seconds NonEmptySetter: 0.60 seconds
Output for 5.4.22
EmptySetter: 0.51 seconds NonEmptySetter: 0.59 seconds
Output for 5.4.21
EmptySetter: 0.51 seconds NonEmptySetter: 0.65 seconds
Output for 5.4.20
EmptySetter: 0.70 seconds NonEmptySetter: 0.70 seconds
Output for 5.4.19
EmptySetter: 0.66 seconds NonEmptySetter: 0.75 seconds
Output for 5.4.18
EmptySetter: 0.68 seconds NonEmptySetter: 0.84 seconds
Output for 5.4.17
EmptySetter: 0.53 seconds NonEmptySetter: 0.64 seconds
Output for 5.4.14, 5.4.16
EmptySetter: 0.51 seconds NonEmptySetter: 0.63 seconds
Output for 5.4.12 - 5.4.13
EmptySetter: 0.52 seconds NonEmptySetter: 0.63 seconds
Output for 5.4.11
EmptySetter: 0.55 seconds NonEmptySetter: 0.64 seconds
Output for 5.4.10
EmptySetter: 0.53 seconds NonEmptySetter: 0.72 seconds
Output for 5.4.1, 5.4.9
EmptySetter: 0.56 seconds NonEmptySetter: 0.66 seconds
Output for 5.4.8
EmptySetter: 0.57 seconds NonEmptySetter: 0.64 seconds
Output for 5.4.7
EmptySetter: 0.55 seconds NonEmptySetter: 0.65 seconds
Output for 5.4.6
EmptySetter: 0.56 seconds NonEmptySetter: 0.68 seconds
Output for 5.4.5
EmptySetter: 0.58 seconds NonEmptySetter: 0.67 seconds
Output for 5.4.4
EmptySetter: 0.54 seconds NonEmptySetter: 0.64 seconds
Output for 5.4.3
EmptySetter: 0.54 seconds NonEmptySetter: 0.65 seconds
Output for 5.4.2
EmptySetter: 0.55 seconds NonEmptySetter: 0.66 seconds
Output for 5.4.0
EmptySetter: 0.54 seconds NonEmptySetter: 0.68 seconds
Output for 5.3.29
EmptySetter: 0.82 seconds NonEmptySetter: 0.78 seconds
Output for 5.3.28
EmptySetter: 0.84 seconds NonEmptySetter: 0.80 seconds
Output for 5.3.27
EmptySetter: 1.06 seconds NonEmptySetter: 0.79 seconds
Output for 5.3.26
EmptySetter: 0.88 seconds NonEmptySetter: 0.79 seconds
Output for 5.3.22, 5.3.25
EmptySetter: 0.86 seconds NonEmptySetter: 0.78 seconds
Output for 5.3.24
EmptySetter: 0.89 seconds NonEmptySetter: 0.79 seconds
Output for 5.3.18, 5.3.23
EmptySetter: 0.83 seconds NonEmptySetter: 0.79 seconds
Output for 5.3.21
EmptySetter: 0.90 seconds NonEmptySetter: 0.78 seconds
Output for 5.3.20
EmptySetter: 0.85 seconds NonEmptySetter: 0.78 seconds
Output for 5.3.19
EmptySetter: 0.84 seconds NonEmptySetter: 0.78 seconds
Output for 5.3.17
EmptySetter: 0.80 seconds NonEmptySetter: 0.74 seconds
Output for 5.3.16
EmptySetter: 0.76 seconds NonEmptySetter: 0.74 seconds
Output for 5.3.15
EmptySetter: 0.78 seconds NonEmptySetter: 0.74 seconds
Output for 5.3.14
EmptySetter: 0.87 seconds NonEmptySetter: 0.79 seconds
Output for 5.3.13
EmptySetter: 0.92 seconds NonEmptySetter: 0.80 seconds
Output for 5.3.8, 5.3.12
EmptySetter: 0.90 seconds NonEmptySetter: 0.82 seconds
Output for 5.3.11
EmptySetter: 0.87 seconds NonEmptySetter: 0.80 seconds
Output for 5.3.10
EmptySetter: 0.82 seconds NonEmptySetter: 0.74 seconds
Output for 5.3.9
EmptySetter: 0.87 seconds NonEmptySetter: 0.81 seconds
Output for 5.3.7
EmptySetter: 1.07 seconds NonEmptySetter: 1.03 seconds
Output for 5.3.6
EmptySetter: 0.81 seconds NonEmptySetter: 0.78 seconds
Output for 5.3.5
EmptySetter: 0.98 seconds NonEmptySetter: 0.92 seconds
Output for 5.3.4
EmptySetter: 0.80 seconds NonEmptySetter: 0.76 seconds
Output for 5.3.3
EmptySetter: 0.82 seconds NonEmptySetter: 0.77 seconds
Output for 5.3.2
EmptySetter: 0.81 seconds NonEmptySetter: 0.80 seconds
Output for 5.3.1
EmptySetter: 0.96 seconds NonEmptySetter: 0.81 seconds
Output for 5.3.0
EmptySetter: 0.81 seconds NonEmptySetter: 0.77 seconds
Output for 5.2.13, 5.2.17
EmptySetter: 1.09 seconds NonEmptySetter: 1.03 seconds
Output for 5.2.14, 5.2.16
EmptySetter: 1.08 seconds NonEmptySetter: 1.02 seconds
Output for 5.2.15
EmptySetter: 1.10 seconds NonEmptySetter: 1.08 seconds
Output for 5.2.12
EmptySetter: 1.08 seconds NonEmptySetter: 1.04 seconds
Output for 5.2.11
EmptySetter: 1.10 seconds NonEmptySetter: 1.10 seconds
Output for 5.2.10
EmptySetter: 1.76 seconds
Process exited with code 137.
Output for 5.2.9
EmptySetter: 1.07 seconds NonEmptySetter: 1.02 seconds
Output for 5.2.8
EmptySetter: 1.09 seconds NonEmptySetter: 1.06 seconds
Output for 5.2.7
EmptySetter: 1.75 seconds
Process exited with code 137.
Output for 5.2.6
EmptySetter: 1.03 seconds NonEmptySetter: 0.96 seconds
Output for 5.2.5
EmptySetter: 1.05 seconds NonEmptySetter: 1.07 seconds
Output for 5.2.4
EmptySetter: 1.11 seconds NonEmptySetter: 1.08 seconds
Output for 5.1.0, 5.2.3
EmptySetter: 1.50 seconds
Process exited with code 137.
Output for 5.2.2
EmptySetter: 1.12 seconds NonEmptySetter: 1.05 seconds
Output for 5.2.1
EmptySetter: 1.06 seconds NonEmptySetter: 1.02 seconds
Output for 5.2.0
EmptySetter: 1.09 seconds NonEmptySetter: 1.02 seconds
Output for 5.1.6
EmptySetter: 1.23 seconds
Process exited with code 137.
Output for 5.1.5
EmptySetter: 1.62 seconds
Process exited with code 137.
Output for 5.1.4
EmptySetter: 1.63 seconds
Process exited with code 137.
Output for 5.1.3
EmptySetter: 1.60 seconds
Process exited with code 137.
Output for 5.1.2
EmptySetter: 1.68 seconds
Process exited with code 137.
Output for 5.1.1
EmptySetter: 1.56 seconds
Process exited with code 137.
Output for 5.0.0 - 5.0.5

Process exited with code 137.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/OfJgh on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/OfJgh on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/OfJgh on line 4
Process exited with code 255.