3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $n = 2000; class ClassMetadata { public $assocations; } class Association { public $inverse; public $name; public $joinColumn; public $joinTable; public $cascade; } $association = new Association(); $association->inverse = "foobar"; $association->name = "foobar"; $association->joinColumn = array("baz" => "boing"); $association->joinTable = "foobar"; $association->cascade = array("persist", "remove", "merge"); $cm = new ClassMetadata(); $cm->associations = array($association, $association); $start = microtime(true); for ($i = 0; $i < $n; $i++) { $data = unserialize(serialize($cm)); } echo number_format(microtime(true) - $start, 4) . "\n"; $cm->associations = array((array)$association, (array)$association); $start = microtime(true); for ($i = 0; $i < $n; $i++) { $data = unserialize(serialize($cm)); } echo number_format(microtime(true) - $start, 4) . "\n";
Output for 7.1.0
0.0102 0.0111
Output for 7.0.14
0.0107 0.0124
Output for 7.0.12
0.0104 0.0109
Output for 7.0.6
0.0081 0.0089
Output for 7.0.5
0.0065 0.0101
Output for 7.0.4
0.0070 0.0080
Output for 7.0.3
0.0059 0.0065
Output for 7.0.2
0.0082 0.0078
Output for 7.0.1
0.0049 0.0055
Output for 7.0.0
0.0071 0.0077
Output for hhvm-3.12.0
0.0110 0.0134
Output for hhvm-3.10.0
0.0083 0.0104
Output for 5.6.28
0.0175 0.0225
Output for 5.6.21
0.0097 0.0126
Output for 5.6.20
0.0093 0.0120
Output for 5.6.19
0.0116 0.0164
Output for 5.6.18
0.0100 0.0140
Output for 5.6.17
0.0142 0.0173
Output for 5.6.16
0.0103 0.0150
Output for 5.2.1, 5.6.15
0.0096 0.0131
Output for 5.6.14
0.0140 0.0142
Output for 5.6.13
0.0100 0.0125
Output for 5.6.12
0.0128 0.0150
Output for 5.6.11
0.0137 0.0143
Output for 5.6.10
0.0126 0.0151
Output for 5.6.9
0.0140 0.0170
Output for 5.6.8
0.0175 0.0200
Output for 5.5.35
0.0142 0.0171
Output for 5.5.34
0.0143 0.0171
Output for 5.5.33
0.0139 0.0155
Output for 5.5.32
0.0095 0.0125
Output for 5.5.31
0.0135 0.0143
Output for 5.5.30
0.0135 0.0167
Output for 5.5.29
0.0151 0.0185
Output for 5.5.28
0.0151 0.0181
Output for 5.5.27
0.0132 0.0162
Output for 5.5.26
0.0109 0.0140
Output for 5.5.25
0.0146 0.0175
Output for 5.5.24
0.0148 0.0184
Output for 5.4.45
0.0097 0.0124
Output for 5.4.44
0.0102 0.0136
Output for 5.4.43
0.0090 0.0125
Output for 5.4.42
0.0113 0.0150
Output for 5.4.41
0.0145 0.0188
Output for 5.4.40
0.0143 0.0174
Output for 5.4.31, 5.4.39
0.0134 0.0175
Output for 5.4.38
0.0128 0.0167
Output for 5.4.37
0.0134 0.0174
Output for 5.4.36
0.0085 0.0127
Output for 5.4.35
0.0127 0.0175
Output for 5.4.34
0.0112 0.0150
Output for 5.4.32
0.0103 0.0138
Output for 5.4.30
0.0123 0.0162
Output for 5.4.29
0.0130 0.0173
Output for 5.4.28
0.0138 0.0181
Output for 5.4.27
0.0131 0.0172
Output for 5.4.26
0.0129 0.0171
Output for 5.4.25
0.0108 0.0133
Output for 5.4.24
0.0147 0.0183
Output for 5.4.23
0.0142 0.0188
Output for 5.4.22
0.0128 0.0165
Output for 5.4.21
0.0110 0.0149
Output for 5.4.20
0.0134 0.0183
Output for 5.4.19
0.0083 0.0122
Output for 5.4.18
0.0104 0.0146
Output for 5.4.17
0.0112 0.0157
Output for 5.4.16
0.0132 0.0168
Output for 5.4.15
0.0094 0.0118
Output for 5.4.7, 5.4.14
0.0081 0.0117
Output for 5.4.13
0.0129 0.0174
Output for 5.4.12
0.0131 0.0174
Output for 5.4.11
0.0124 0.0178
Output for 5.4.10
0.0122 0.0152
Output for 5.4.9
0.0129 0.0178
Output for 5.4.8
0.0081 0.0119
Output for 5.4.6
0.0134 0.0188
Output for 5.4.5
0.0135 0.0181
Output for 5.4.4
0.0121 0.0163
Output for 5.4.3
0.0135 0.0178
Output for 5.4.2
0.0121 0.0155
Output for 5.4.1
0.0141 0.0180
Output for 5.4.0
0.0083 0.0118
Output for 5.3.29
0.0075 0.0107
Output for 5.3.28
0.0118 0.0154
Output for 5.3.27
0.0091 0.0181
Output for 5.3.26
0.0098 0.0132
Output for 5.3.25
0.0103 0.0146
Output for 5.3.24
0.0137 0.0179
Output for 5.3.23
0.0099 0.0133
Output for 5.3.22
0.0112 0.0147
Output for 5.3.21
0.0108 0.0141
Output for 5.3.20
0.0119 0.0153
Output for 5.3.19
0.0133 0.0176
Output for 5.3.18
0.0087 0.0156
Output for 5.3.17
0.0127 0.0163
Output for 5.3.16
0.0132 0.0170
Output for 5.3.15
0.0102 0.0139
Output for 5.3.14
0.0114 0.0121
Output for 5.3.13
0.0125 0.0150
Output for 5.3.12
0.0089 0.0117
Output for 5.3.11
0.0130 0.0165
Output for 5.3.10
0.0083 0.0111
Output for 5.3.9
0.0106 0.0141
Output for 5.3.8
0.0083 0.0110
Output for 5.3.7
0.0129 0.0163
Output for 5.3.6
0.0097 0.0134
Output for 5.3.5
0.0103 0.0135
Output for 5.3.4
0.0099 0.0122
Output for 5.2.3, 5.3.3
0.0084 0.0112
Output for 5.3.2
0.0137 0.0172
Output for 5.3.1
0.0127 0.0161
Output for 5.3.0
0.0136 0.0164
Output for 5.2.17
0.0091 0.0111
Output for 5.2.16
0.0122 0.0179
Output for 5.2.15
0.0087 0.0120
Output for 5.2.14
0.0143 0.0177
Output for 5.2.13
0.0146 0.0164
Output for 5.2.12
0.0137 0.0168
Output for 5.2.11
0.0142 0.0176
Output for 5.2.10
0.0150 0.0188
Output for 5.2.9
0.0124 0.0175
Output for 5.2.8
0.0144 0.0176
Output for 5.2.7
0.0149 0.0182
Output for 5.2.6
0.0154 0.0193
Output for 5.2.5
0.0101 0.0132
Output for 5.2.4
0.0103 0.0137
Output for 5.2.2
0.0086 0.0114
Output for 5.2.0
0.0083 0.0121
Output for 5.1.6
0.0084 0.0115
Output for 5.1.5
0.0087 0.0117
Output for 5.1.4
0.0135 0.0168
Output for 5.1.3
0.0084 0.0110
Output for 5.1.2
0.0085 0.0114
Output for 5.1.1
0.0119 0.0156
Output for 5.1.0
0.0143 0.0180
Output for 5.0.5
0.0163 0.0215
Output for 5.0.4
0.0109 0.0131
Output for 5.0.3
0.0094 0.0138
Output for 5.0.2
0.0083 0.0114
Output for 5.0.1
0.0079 0.0110
Output for 5.0.0
0.0079 0.0108
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/NiQXA on line 6
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/NiQXA on line 6
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/NiQXA on line 6
Process exited with code 255.